openapi: 3.2.0 info: title: Teler API Reference Secrets API summary: Programmable voice infrastructure for AI agents. description: 'The Teler API lets you place and control programmable voice calls, stream live audio to AI agents, and observe everything that happens on a call in real time.' contact: name: Teler support email: support@frejun.com version: 0.1.0 servers: - url: https://api.frejun.ai description: Production security: - ApiKeyAuth: [] tags: - name: Secrets description: Manage secret API keys used for authenticating requests. Create, rotate, and delete secrets — rotate periodically and keep them server-side. paths: /api/v1/secrets: post: tags: - Secrets summary: Create a secret operationId: create_secret requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SecretCreate' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SecretResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' get: tags: - Secrets summary: List secrets operationId: list_secrets parameters: - name: limit in: query required: false schema: type: integer default: 10 title: Limit - name: search in: query required: false schema: anyOf: - type: string - type: 'null' title: Search - name: cursor_after in: query required: false schema: anyOf: - type: string - type: 'null' title: Cursor After - name: cursor_before in: query required: false schema: anyOf: - type: string - type: 'null' title: Cursor Before responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CursorPage_SecretListResponse_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' /api/v1/secrets/{secret_id}: get: tags: - Secrets summary: Retrieve a secret operationId: retrieve_secret parameters: - name: secret_id in: path required: true schema: type: string title: Secret Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SecretResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' patch: tags: - Secrets summary: Update a secret operationId: update_secret parameters: - name: secret_id in: path required: true schema: type: string title: Secret Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SecretUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SecretResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' delete: tags: - Secrets summary: Delete a secret operationId: delete_secret parameters: - name: secret_id in: path required: true schema: type: string title: Secret Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DefaultResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' components: schemas: ValidationFieldError: properties: loc: items: {} type: array title: Loc description: Path to the offending field, e.g. `["body", "to_number"]`. msg: type: string title: Msg description: Human-readable explanation of the problem. type: type: string title: Type description: Programmatic error type, e.g. `string_pattern_mismatch`. type: object required: - loc - msg - type title: ValidationFieldError description: One field-level problem within a `422` validation error. SecretCreate: properties: name: type: string title: Name type: object required: - name title: SecretCreate SecretUpdate: properties: name: anyOf: - type: string - type: 'null' title: Name rotate: type: boolean title: Rotate default: false type: object title: SecretUpdate DefaultResponse: properties: success: type: boolean title: Success message: type: string title: Message type: object required: - success - message title: DefaultResponse SecretListResponse: properties: id: type: string title: Id name: type: string title: Name type: object required: - id - name title: SecretListResponse CursorPage_SecretListResponse_: properties: data: items: $ref: '#/components/schemas/SecretListResponse' type: array title: Data description: The page of results, newest first. next_cursor: anyOf: - type: string - type: 'null' title: Next Cursor description: Pass as `cursor_after` to fetch the next (older) page. `null` on the last page. previous_cursor: anyOf: - type: string - type: 'null' title: Previous Cursor description: Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page. has_more: type: boolean title: Has More description: Whether more results exist after this page. default: false type: object required: - data title: CursorPage[SecretListResponse] CallAppListResponse: properties: id: type: string title: Id name: type: string title: Name type: object required: - id - name title: CallAppListResponse SecretResponse: properties: id: type: string title: Id name: type: string title: Name secret_value: type: string title: Secret Value rotated_at: anyOf: - type: string format: date-time - type: 'null' title: Rotated At created_at: type: string format: date-time title: Created At needs_rotation: type: boolean title: Needs Rotation default: false sip_trunks: items: $ref: '#/components/schemas/SipTrunkListResponse' type: array title: Sip Trunks default: [] voice_apps: items: $ref: '#/components/schemas/CallAppListResponse' type: array title: Voice Apps default: [] type: object required: - id - name - secret_value - created_at title: SecretResponse SipTrunkListResponse: properties: id: type: string title: Id name: type: string title: Name type: object required: - id - name title: SipTrunkListResponse ValidationErrorResponse: properties: success: type: boolean title: Success description: Always `false`. default: false message: type: string title: Message description: Always `"Validation Error"` for this response. default: Validation Error errors: items: $ref: '#/components/schemas/ValidationFieldError' type: array title: Errors description: One entry per field that failed validation. type: object required: - errors title: ValidationErrorResponse description: Returned with `422` when the request fails schema validation. example: errors: - loc: - body - to_number msg: String should match pattern '^\+\d{7,15}$' type: string_pattern_mismatch message: Validation Error success: false securitySchemes: ApiKeyAuth: type: apiKey in: header name: x-api-key description: Your secret account API key. Create one in the Teler dashboard.