Skip to content

Commit 06cd9c3

Browse files
chrisdengsogithub-actions[bot]
authored andcommitted
feat!: v2.0.0, breaking API changes
1 parent 4421b14 commit 06cd9c3

82 files changed

Lines changed: 503 additions & 449 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.speakeasy/gen.lock‎

Lines changed: 80 additions & 80 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ generation:
3232
generateNewTests: true
3333
skipResponseBodyAssertions: false
3434
php:
35-
version: 1.1.1
35+
version: 2.0.0
3636
additionalDependencies:
3737
autoload: {}
3838
autoload-dev: {}

‎.speakeasy/openapi.json‎

Lines changed: 41 additions & 40 deletions
Large diffs are not rendered by default.

‎CHANGELOG.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Changelog
22

3+
## 2.0.0 (2026-10-22)
4+
5+
Full Changelog: [v1.1.1...v2.0.0](https://github.com/moderation-api/sdk-php/compare/v1.1.1...v2.0.0)
6+
7+
### ⚠ Breaking changes
8+
9+
- `GET /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
10+
- `POST /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
11+
- `POST /actions/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
12+
- `POST /actions/{actionId}/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
13+
- `DELETE /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
14+
- `GET /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
15+
- `PUT /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
16+
- `GET /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
17+
- `POST /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
18+
- `GET /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
19+
- `POST /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
20+
- `DELETE /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
21+
- `GET /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
22+
- `PUT /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
23+
- `DELETE /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
24+
- `PUT /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
25+
- `POST /channels/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
26+
- `POST /moderate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
27+
- `POST /moderate/image`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
28+
- `POST /moderate/text`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
29+
- `POST /projects`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
30+
- `PUT /projects/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
31+
- `POST /projects/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
32+
- `POST /projects/{projectId}/channels`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
33+
- `GET /queue/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
34+
- `GET /queue/{id}/items`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
35+
- `POST /queue/{id}/items/{itemId}/resolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
36+
- `POST /queue/{id}/items/{itemId}/unresolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
37+
- `GET /queue/{id}/stats`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
38+
- `POST /webhooks`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
39+
- `PUT /webhooks/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
40+
- `GET /wordlist`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
41+
- `GET /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
42+
- `PUT /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
43+
- `GET /wordlist/{id}/embedding-status`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
44+
- `DELETE /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
45+
- `POST /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
46+
47+
### API changes
48+
49+
- a breaking change was detected but the version is still `1.1.0`
50+
351
## 1.1.1 (2026-10-22)
452

553
Full Changelog: [v1.1.0...v1.1.1](https://github.com/moderation-api/sdk-php/compare/v1.1.0...v1.1.1)

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ foreach ($responses as $response) {
248248
Moderation API has two kinds of API keys:
249249

250250
- A **project key** works with one project: content, authors, review queues, actions, wordlists, webhooks and the account. Most integrations need only this key.
251-
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. The management API is available on Enterprise plans.
251+
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. It can also use any project's endpoints: name the project with `projectId`.
252252

253-
Each key works only with its own endpoints. With the wrong key the API returns `403` with the code `project_key_required` or `organization_key_required`. If you use both, create one client for each key:
253+
A project key can't call the management API: the API returns `403` with the code `organization_key_required`. If you use both kinds of key, create one client for each:
254254

255255
```php
256256
use ModerationApi\ModerationApi;

‎docs/Models/Components/BadRequestErrorCode.md‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
Exactly what went wrong. Stable; safe to branch on. New codes may be added.
44

55
- `invalid_request`: A parameter is invalid. `message` says which one.
6-
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project.
6+
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the key reaches more than one project. `message` lists the projects it reaches.
7+
- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead.
78
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`.
89

910

1011
## Values
1112

12-
| Name | Value |
13-
| ------------------- | ------------------- |
14-
| `InvalidRequest` | invalid_request |
15-
| `ProjectIdRequired` | project_id_required |
16-
| `ValidationFailed` | validation_failed |
13+
| Name | Value |
14+
| ---------------------- | ---------------------- |
15+
| `InvalidRequest` | invalid_request |
16+
| `ProjectIdRequired` | project_id_required |
17+
| `ProjectNameAmbiguous` | project_name_ambiguous |
18+
| `ValidationFailed` | validation_failed |

0 commit comments

Comments
 (0)