# Classify a phrase against one version POST /v1/t/adapters/ids/classifier/{id}/version/{version}/classify Select code sample ``` const url = 'https://example.com/v1/t/adapters/ids/classifier/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/version/1/classify'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"phrase":"example"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ``` curl --request POST \ --url https://example.com/v1/t/adapters/ids/classifier/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/version/1/classify \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "phrase": "example" }' ``` - /v1/t/adapters/ids/classifier/{id}/version/{version}/classify Classifies a phrase using the trained artefact of the addressed version, so a caller that pinned a version keeps getting that version’s behavior while another version is being trained. Classification is bound to a short deadline; exceeding it yields 504, a client cancellation 499. ## Permission This operation needs the permission [`tenant:scenario_template:manage`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#tenant-scenario_template-manage). ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/tenant/#bearerauth)** ## Parameters ### Path Parameters **id** required string format: uuid Classifier id (UUID). **version** required integer Classifier version. Version 0 is the one every classifier created before versioning occupies. ### Header Parameters **X-Tenant-Sid** string Names the target tenant. By principal: - A tenant-scoped principal may omit it. - A principal with no tenant of its own names one here. Refused when: - A tenant-scoped principal sends a value naming any other tenant. - A principal with no tenant of its own omits it. ## Request Bodyrequired Media typeapplication/json object **phrase** required string ##### Examplegenerated ``` { "phrase": "example" } ``` ## Responses ### 200 OK Media typeapplication/json object **intents** required object ***key*** additional properties number format: float ##### Examplegenerated ``` { "intents": { "additionalProperty": 1 } } ``` ### 400 Bad request Media typeapplication/json object **name** required string **message** required string **code** required integer **status** required integer ##### Examplegenerated ``` { "name": "example", "message": "example", "code": 1, "status": 1 } ``` ### 401 Unauthorized ### 403 Forbidden ### 404 Not found Media typeapplication/json object **name** required string **message** required string **code** required integer **status** required integer ##### Examplegenerated ``` { "name": "example", "message": "example", "code": 1, "status": 1 } ``` ### 500 Internal server error Media typeapplication/json object **name** required string **message** required string **code** required integer **status** required integer ##### Examplegenerated ``` { "name": "example", "message": "example", "code": 1, "status": 1 } ``` ### 502 Bad gateway (upstream adapter error) ### 504 Classification deadline exceeded Media typeapplication/json object **name** required string **message** required string **code** required integer **status** required integer ##### Examplegenerated ``` { "name": "example", "message": "example", "code": 1, "status": 1 } ```