openapi: 3.0.3 info: title: Speechmatics Management API version: 1.0.0 description: >- The Speechmatics Management API is used to manage projects and API keys programmatically. Supports creating, listing, updating, and deleting projects and API keys for Speechmatics services including batch, real-time, flow, and TTS. contact: email: support@speechmatics.com x-providerName: speechmatics x-serviceName: management-api servers: - url: https://mp.speechmatics.com/v1 description: Speechmatics Management Platform API security: - bearerAuth: [] components: securitySchemes: bearerAuth: type: apiKey in: header name: Authorization description: "Bearer token authentication. Use the format: Bearer $API_KEY_OR_JWT" schemas: Project: type: object required: - project_id properties: project_id: type: integer is_default: type: boolean nullable: true is_active: type: boolean nullable: true name: type: string description: type: string created_at: type: string format: date-time deleted_at: type: string format: date-time ProjectsResponse: type: array items: $ref: '#/components/schemas/Project' CreateProjectRequest: type: object required: - name properties: contract_id: type: integer description: Optional contract ID for the project. name: type: string description: The name of the project. description: type: string description: A description of the project and its intended use. UpdateProjectRequest: type: object required: - name properties: name: type: string description: The new name for the project. ApiKey: type: object required: - apikey_id properties: apikey_id: type: string name: type: string created_at: type: string format: date-time client_ref: type: string ApiKeysResponse: type: array items: $ref: '#/components/schemas/ApiKey' CreateApiKeysRequest: type: object properties: project_id: type: integer nullable: true name: type: string nullable: true maxLength: 120 client_ref: type: string nullable: true ttl: type: integer nullable: true minimum: 60 maximum: 86400 description: Token time-to-live in seconds (60-86400). region: type: string nullable: true enum: - eu - usa - au CreateApiKeysResponse: type: object required: - key_value - apikey_id properties: key_value: type: string description: The API key value (only returned on creation). apikey_id: type: string ErrorResponse: type: object required: - code - error properties: code: type: integer description: The HTTP status code. error: type: string description: The error message. detail: type: string description: Additional error details. OkResponse: type: object properties: status: type: string description: Status string. example: OK paths: /api-keys: get: summary: Get all API keys operationId: listApiKeys tags: - API Keys parameters: - name: project_id in: query required: false schema: type: integer description: Filter API keys by project ID. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApiKeysResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: summary: Create an API key operationId: createApiKey tags: - API Keys parameters: - name: type in: query required: false schema: type: string enum: - rt - batch - flow - tts description: Product the token will be authorized to access (default batch). requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/CreateApiKeysRequest' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CreateApiKeysResponse' '403': description: Forbidden (project has maximum API keys) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api-keys/{apikey_id}: delete: summary: Delete an API key operationId: deleteApiKey tags: - API Keys parameters: - name: apikey_id in: path required: true schema: type: string description: The API key ID to delete. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OkResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /projects: get: summary: Get all projects operationId: listProjects tags: - Projects responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ProjectsResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: summary: Create a new project operationId: createProject tags: - Projects requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateProjectRequest' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Project' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /projects/{project_id}: parameters: - name: project_id in: path required: true schema: type: integer description: The project ID. get: summary: Get a project by ID operationId: getProject tags: - Projects responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Project' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Project was not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Project Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' put: summary: Update a project operationId: updateProject tags: - Projects requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateProjectRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Project' '404': description: Not Found delete: summary: Delete a project operationId: deleteProject tags: - Projects responses: '204': description: Project deleted. '403': description: Forbidden (outstanding payments) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Project was not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '410': description: Gone content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse'