# POST Validate setting the authoring language

Dry-runs the authoring change without writing anything and returns the same problems the write would. The 200 verdict reports what the change would do to the language's copy of the owned text: `replaced_draft_count` draft values replaced by published values and `cleared_optional_count` optional values cleared. Both are 0 when the language is already the authoring language. `plan_token` binds the write to these counts: send it to the write. Send a `plan_token` here to check whether it is still current. Requires `customisers:write`.

- Source URL: https://www.signcustomiser.com/help/api/v3-post-validate-setting-the-authoring-language/
- Markdown URL: https://www.signcustomiser.com/help/api/v3-post-validate-setting-the-authoring-language.md
- Group: Customiser languages
- OpenAPI for this group: https://www.signcustomiser.com/help/openapi/customiser-languages.json
- Method: POST
- Path: /api/v3/customisers/{customiser_id}/languages/{language_code}/validate-authoring
- Auth: Bearer token
- Required scopes: `customisers:write`

## Path parameters

- customiser_id (string, required): The customiser id. Example: 1
- language_code (string, required): The language tag. Example: fr

## Body parameters

- plan_token (string, optional): No description provided.

## Request body example

```json
{
  "plan_token": "9c1e4f0b2a7d4e8f9a6b3c5d7e1f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f"
}
```

## cURL example

```bash
curl https://web.signcustomiser.com/api/v3/customisers/1/languages/fr/validate-authoring \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "plan_token": "9c1e4f0b2a7d4e8f9a6b3c5d7e1f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f"
}'
```

## Response examples

### 200 Authoring change would apply

```json
{
  "data": {
    "object": "customiser_language_validation",
    "operation": "set_authoring",
    "customiser_id": 42,
    "language_code": "fr",
    "replaced_draft_count": 3,
    "cleared_optional_count": 1,
    "plan_token": "9c1e4f0b2a7d4e8f9a6b3c5d7e1f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f",
    "valid": true
  },
  "links": {
    "self": "https://web.signcustomiser.com/api/v3/customisers/42/languages/fr/validate-authoring",
    "documentation": "https://www.signcustomiser.com/help/api/"
  },
  "meta": {
    "api_version": "v3",
    "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
  }
}
```

### 403 Insufficient scope

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This operation requires the customisers:write scope.",
  "required_scopes": [
    "customisers:write"
  ],
  "granted_scopes": [
    "customisers:read"
  ],
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```
