Skysay Self Hosting API

Self-hosted gateways and customer phone servers.

GitHub OpenAPI

Operations 12

GET /v1/gateway-deployments List media gateways #
POST /v1/gateway-deployments Create a deployment #
PATCH /v1/gateway-deployments/{gateway_id}/content-storage Choose where a self-hosted deployment keeps call content #
PATCH /v1/gateway-deployments/{gateway_id}/outbound-execution-mode Choose whether this deployment dials its own outbound calls #
GET /v1/gateway-deployments/{gateway_id}/tokens List a gateway's machine tokens, masked to their prefixes #
POST /v1/gateway-deployments/{gateway_id}/tokens/{gateway_token_id}/revoke Revoke one gateway machine token immediately #
GET /v1/phone-servers List customer phone servers #
POST /v1/phone-servers Create a customer phone server for self-hosted call media #
GET /v1/phone-servers/{phone_server_id} Get one customer phone server #
PATCH /v1/phone-servers/{phone_server_id} Update one customer phone server #
POST /v1/phone-servers/{phone_server_id}/test Dry-run verify a customer phone server before assigning Number rules #
GET /v1/self-hosted/install-plan Fetch a mode-specific self-hosted or customer-hosted gateway install plan #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/skysay-ai:skysay-ai-self-hosting-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

skysay-ai-self-hosting-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'Agent-native telephony API for customer onboarding, credits, numbers, webhooks, gateways, and policy-gated calls. Request bodies are UTF-8. Send JSON: a body that is absent or whitespace-only reads as an empty object, and a JSON body that is not valid JSON, is not a JSON object, or is not UTF-8 returns 400. A request carrying any Content-Encoding other than identity returns 415 — this API does not accept compressed request bodies. A required field that is missing, null or blank returns 400 naming the field.'
  title: Skysay Self Hosting API
  version: 0.1.0
servers:
- url: https://api.skysay.ai
security:
- ApiKeyBearer: []
tags:
- description: Self-hosted gateways and customer phone servers.
  name: Self-hosting
paths:
  /v1/gateway-deployments:
    get:
      description: 'One bounded page, newest first, as an object: the items under `gateway_deployments` and `pagination`. Follow `pagination.next_cursor` while `pagination.has_more` is true; a walk returns every row that exists for the whole walk exactly once.'
      operationId: listGatewayDeployments
      parameters:
      - description: Optional. Defaults to the key's own organization; naming another organization is refused.
        in: query
        name: organization_id
        required: false
        schema:
          type: string
      - description: Only this project's rows. A project of another organization is a 400.
        in: query
        name: project_id
        required: false
        schema:
          type: string
      - description: Page size, 1 to 200; 50 when omitted. A value outside that range or not a whole number is a 400, never shortened.
        in: query
        name: limit
        required: false
        schema:
          default: 50
          maximum: 200
          minimum: 1
          type: integer
      - description: The previous page's `pagination.next_cursor`, exactly as received. Anything else is a 400.
        in: query
        name: cursor
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  gateway_deployments:
                    description: At most `limit` items, at most 200.
                    items:
                      type: object
                    type: array
                  pagination:
                    $ref: '#/components/schemas/ListPagination'
                required:
                - gateway_deployments
                - pagination
                type: object
          description: One page. Server-Timing and X-Skysay-Query-Count describe the read; Cache-Control is no-store.
        '400':
          description: '`limit` outside its range or missing where required, a `cursor` that is not a `next_cursor`, or a project of another organization.'
      summary: List media gateways
      tags:
      - Self-hosting
    post:
      description: 'Registers a gateway deployment. organization_id and project_id are optional: a self-hoster holding one API key has no route to look either id up, so they default to the principal''s own organization and that organization''s first project. A supplied organization must be the principal''s own, and a supplied project must belong to it.'
      operationId: createGatewayDeployment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatewayDeployment'
        required: true
      responses:
        '201':
          description: Gateway
      summary: Create a deployment
      tags:
      - Self-hosting
  /v1/gateway-deployments/{gateway_id}/content-storage:
    patch:
      description: 'Sets content_storage to ''skysay'' (the default: after the call the gateway uploads the recording and transcript; during the call it sends the arguments of each tool call, any knowledge-base question the agent sends and, when the agent has tools that write to your systems, what the caller says) or ''gateway'' (content-local: recordings, transcripts and evidence stay in the gateway''s call-evidence/ directory and Skysay accepts no call content from this deployment''s token). Only a self-hosted deployment in outbound_execution_mode ''local'' may be ''gateway'', and it cannot go back to ''queue'' while it is. In ''gateway'' mode Skysay receives call metadata only: call id, direction, from/to numbers, timestamps, duration, end reason and answer classification as machine values, SIP status code and usage quantities for billing; any other POST from the deployment''s token answers 409 content_retained_on_gateway. Agents that need Skysay Cloud to process call content -- tools other than end_call, knowledge search, workflows, or a component on a key from Skysay''s own provider accounts -- are refused before media with a named reason. The gateway applies the setting from its next restart: change it, then restart the gateway. Text you send to place a call (instructions, opening line, authorization reason) is configuration that Skysay stores. Do not put patient or caller data in it.'
      operationId: setGatewayContentStorage
      parameters:
      - in: path
        name: gateway_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatewayContentStorage'
        required: true
      responses:
        '200':
          description: Updated gateway deployment
      summary: Choose where a self-hosted deployment keeps call content
      tags:
      - Self-hosting
      x-required-scopes:
      - gateways:write
  /v1/gateway-deployments/{gateway_id}/outbound-execution-mode:
    patch:
      description: 'Sets outbound_execution_mode to ''queue'' (the default: admission enqueues a call.outbound_originate job an organization-scoped worker claims) or ''local'' (the deployment asks for admission and dials itself, so no organization-scoped credential is needed on that box). Only a self-hosted deployment may be ''local''. The switch is refused in either direction while calls are still in flight -- going local while outbound jobs are still queued would strand them, and going back to queue while the deployment is still dialing locally would abandon those calls. Once the organization has a local-mode deployment and no queue-mode deployment left, a remote POST /v1/calls for its numbers fails closed rather than enqueueing a job nothing would claim.'
      operationId: setGatewayOutboundExecutionMode
      parameters:
      - in: path
        name: gateway_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatewayOutboundExecutionMode'
        required: true
      responses:
        '200':
          description: Updated gateway deployment
      summary: Choose whether this deployment dials its own outbound calls
      tags:
      - Self-hosting
      x-required-scopes:
      - gateways:write
  /v1/gateway-deployments/{gateway_id}/tokens:
    get:
      operationId: listGatewayTokens
      parameters:
      - in: path
        name: gateway_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Gateway tokens and their page marker
      summary: List a gateway's machine tokens, masked to their prefixes
      tags:
      - Self-hosting
  /v1/gateway-deployments/{gateway_id}/tokens/{gateway_token_id}/revoke:
    post:
      operationId: revokeGatewayToken
      parameters:
      - in: path
        name: gateway_id
        required: true
        schema:
          type: string
      - in: path
        name: gateway_token_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Revoked gateway token
      summary: Revoke one gateway machine token immediately
      tags:
      - Self-hosting
  /v1/phone-servers:
    get:
      description: 'One bounded page, newest first, as an object: the items under `phone_servers` and `pagination`. Follow `pagination.next_cursor` while `pagination.has_more` is true; a walk returns every row that exists for the whole walk exactly once. A project page includes the organization''s servers that belong to no project.'
      operationId: listPhoneServers
      parameters:
      - description: Optional. Defaults to the key's own organization; naming another organization is refused.
        in: query
        name: organization_id
        required: false
        schema:
          type: string
      - description: Only this project's rows. A project of another organization is a 400.
        in: query
        name: project_id
        required: false
        schema:
          type: string
      - description: Page size, 1 to 200; 50 when omitted. A value outside that range or not a whole number is a 400, never shortened.
        in: query
        name: limit
        required: false
        schema:
          default: 50
          maximum: 200
          minimum: 1
          type: integer
      - description: The previous page's `pagination.next_cursor`, exactly as received. Anything else is a 400.
        in: query
        name: cursor
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  pagination:
                    $ref: '#/components/schemas/ListPagination'
                  phone_servers:
                    description: At most `limit` items, at most 200.
                    items:
                      type: object
                    type: array
                required:
                - phone_servers
                - pagination
                type: object
          description: One page. Server-Timing and X-Skysay-Query-Count describe the read; Cache-Control is no-store.
        '400':
          description: '`limit` outside its range or missing where required, a `cursor` that is not a `next_cursor`, or a project of another organization.'
      summary: List customer phone servers
      tags:
      - Self-hosting
    post:
      operationId: createPhoneServer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneServer'
        required: true
      responses:
        '201':
          description: Phone server
      summary: Create a customer phone server for self-hosted call media
      tags:
      - Self-hosting
  /v1/phone-servers/{phone_server_id}:
    get:
      operationId: getPhoneServer
      parameters:
      - in: path
        name: phone_server_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Phone server
      summary: Get one customer phone server
      tags:
      - Self-hosting
    patch:
      operationId: updatePhoneServer
      parameters:
      - in: path
        name: phone_server_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Phone server
      summary: Update one customer phone server
      tags:
      - Self-hosting
  /v1/phone-servers/{phone_server_id}/test:
    post:
      operationId: testPhoneServer
      parameters:
      - in: path
        name: phone_server_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Verified phone server
      summary: Dry-run verify a customer phone server before assigning Number rules
      tags:
      - Self-hosting
  /v1/self-hosted/install-plan:
    get:
      operationId: getSelfHostedInstallPlan
      responses:
        '200':
          description: Self-hosted install plan
      security: []
      summary: Fetch a mode-specific self-hosted or customer-hosted gateway install plan
      tags:
      - Self-hosting
components:
  schemas:
    GatewayOutboundExecutionMode:
      properties:
        outbound_execution_mode:
          enum:
          - queue
          - local
          type: string
      required:
      - outbound_execution_mode
      type: object
    GatewayDeployment:
      properties:
        carrier_account_id:
          type: string
        deployment_model_id:
          enum:
          - fully_managed_cloud
          - managed_numbers_self_hosted_gateway
          type: string
        mode:
          enum:
          - cloud_hosted
          - self_hosted
          type: string
        organization_id:
          description: Optional. Defaults to the authenticated principal's own organization. When supplied it must match it; another workspace is refused.
          type: string
        plan_id:
          type: string
        project_id:
          description: Optional. Defaults to the organization's first project. When supplied it must belong to that organization.
          type: string
        provider_account_id:
          type: string
      type: object
    PhoneServer:
      properties:
        allowed_sip_ips:
          items:
            type: string
          type: array
        auth_mode:
          enum:
          - ip_allowlist
          - sip_credentials
          - ip_allowlist_and_credentials
          type: string
        metadata:
          type: object
        name:
          description: Customer-facing label, e.g. My phone server.
          type: string
        organization_id:
          type: string
        password_reference:
          description: Reference to an external secret; plaintext passwords are not returned.
          type: string
        port:
          default: 5060
          type: integer
        project_id:
          type: string
        server_address:
          description: Hostname or public IP of the customer's phone server.
          type: string
        transport:
          enum:
          - udp
          - tcp
          - tls
          type: string
        username:
          type: string
      required:
      - organization_id
      - server_address
      type: object
    ListPagination:
      additionalProperties: false
      properties:
        has_more:
          description: True while older rows remain. A page is the whole list only when this is false.
          type: boolean
        limit:
          description: The page size used.
          minimum: 1
          type: integer
        next_cursor:
          description: Send as `cursor` to read the next page; null on the last page.
          type:
          - string
          - 'null'
        returned:
          description: Items on this page.
          minimum: 0
          type: integer
      required:
      - limit
      - returned
      - has_more
      - next_cursor
      type: object
    GatewayContentStorage:
      properties:
        content_storage:
          enum:
          - skysay
          - gateway
          type: string
      required:
      - content_storage
      type: object
  securitySchemes:
    ApiKeyBearer:
      description: 'A scoped sky_ API key, sent as Authorization: Bearer sky_...'
      scheme: bearer
      type: http