Every API here is available over the APIs.io API and to AI agents over MCP.
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 Account API
version: 0.1.0
servers:
- url: https://api.skysay.ai
security:
- ApiKeyBearer: []
tags:
- description: Workspace, API keys, capabilities and audit.
name: Account
paths:
/v1/activation-state:
get:
operationId: getActivationState
responses:
'200':
description: Activation state
summary: Get live customer activation checklist and next action
tags:
- Account
/v1/api-keys:
get:
description: 'One bounded page, newest first, as an object: the items under `api_keys` 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: listApiKeys
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: 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:
api_keys:
description: At most `limit` items, at most 200.
items:
type: object
type: array
pagination:
$ref: '#/components/schemas/ListPagination'
required:
- api_keys
- 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 scoped API keys
tags:
- Account
post:
description: Requested scopes must be workspace scopes the caller itself holds, or one of the grant bundles `all`, `all-read`, `all-write`, which are recorded by name and expanded at use time against the scopes a workspace key can hold. Wildcard scopes, and scopes reserved for Skysay's own services, are not grantable.
operationId: createApiKey
responses:
'201':
description: API key with one-time token
'403':
description: A requested scope is not grantable to a workspace key, or the caller does not hold it
summary: Create a scoped API key
tags:
- Account
/v1/api-keys/scopes:
get:
operationId: listApiKeyScopes
responses:
'200':
description: Scope catalogue
summary: Read the grantable scope catalogue and bundles
tags:
- Account
/v1/api-keys/{key_id}:
get:
operationId: getApiKey
parameters:
- in: path
name: key_id
required: true
schema:
type: string
responses:
'200':
description: API key
summary: Get one API key
tags:
- Account
/v1/api-keys/{key_id}/revoke:
post:
operationId: revokeApiKey
parameters:
- in: path
name: key_id
required: true
schema:
type: string
responses:
'200':
description: Revoked API key
summary: Revoke an API key
tags:
- Account
/v1/audit-events:
get:
description: 'One bounded page, newest first by `created_at`, ties by creation order, as an object: the items under `audit_events` 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: listAuditEvents
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: Page size, 1 to 500; 100 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: 100
maximum: 500
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:
audit_events:
description: At most `limit` items, at most 500.
items:
type: object
type: array
pagination:
$ref: '#/components/schemas/ListPagination'
required:
- audit_events
- 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 audit events
tags:
- Account
/v1/health:
get:
operationId: getHealth
responses:
'200':
description: Liveness report
security: []
summary: Read shallow public API liveness
tags:
- Account
/v1/organizations:
post:
operationId: createOrganization
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganization'
required: true
responses:
'201':
description: Workspace created
security: []
summary: Create a sandbox customer workspace when signup mode allows it
tags:
- Account
/v1/organizations/{organization_id}/capabilities:
get:
description: 'Pure read. Every workspace has exactly one record, created `active` with the workspace on the default profile, the channels the workspace holds and every destination except the sanctioned set (`all_countries: true`): there is no approval step. `not_activated` appears only for a workspace whose record is missing (contact support). `pending_review` means a request is with an Skysay operator and nothing new is authorized yet; `suspended` means an operator paused outbound. When `all_countries` is false, `countries` is the explicit allowlist (ISO 3166-1 alpha-2). `calling_rules` is the application cadence contract an operator recorded on approval, or null, and `calling_rules_active` says whether it is enforced right now. Every outbound call and SMS is authorized against this record (see POST /v1/policies/authorize-outbound).'
operationId: getCapabilities
parameters:
- in: path
name: organization_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilitiesDetail'
description: Capabilities record, calling rules, available profiles and usage
'403':
description: The credential does not belong to this organization
'404':
description: Unknown organization
summary: Read the workspace's capabilities record, the selectable use-case profiles, and…
tags:
- Account
x-required-scopes:
- onboarding:read
post:
description: 'Select the use-case profiles, channels and destinations outbound should be authorized for, and accept the outbound policy by sending `policy_version`. The destination choice is explicit: `all_countries: true` (every destination except the sanctioned set) or `countries` naming at least one well-formed ISO 3166-1 alpha-2 code. A request with neither, with an empty list, or with an entry that is not a two-letter code is refused with 400 and nothing is written, so an active allowlist is never widened or emptied by a request that was refused. A verified workspace that accepts the policy and selects no custom profile is activated immediately within the profiles'' default caps; anything else opens an Skysay review, and what is already active stays active until the review resolves. `calling_rules` cannot be set here; an operator records them on approval.'
operationId: requestCapabilities
parameters:
- in: path
name: organization_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilitiesRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Capabilities'
description: The stored record, active or pending review
'400':
description: No valid profile selected, no destination chosen (all_countries or a non-empty countries list), an unrecognized country code, or calling_rules / the retired metadata.operational_profile supplied
'403':
description: The credential does not belong to this organization
'404':
description: Unknown organization
summary: Request or change the workspace's capabilities
tags:
- Account
x-required-scopes:
- onboarding:write
/v1/organizations/{organization_id}/capabilities/accept-policy:
post:
description: 'Stores `policy_version` with the acceptance time and actor and leaves the profiles, channels, destinations, limits and status exactly as they are: it never activates, suspends or queues anything by itself. Use POST /v1/organizations/{organization_id}/capabilities to change what the workspace is authorized for.'
operationId: acceptOutboundPolicy
parameters:
- in: path
name: organization_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilitiesPolicyAcceptance'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Capabilities'
description: The stored record
'400':
description: No policy_version supplied and none already stored
'403':
description: The credential does not belong to this organization
summary: Record acceptance of the outbound policy without changing the capabilities…
tags:
- Account
x-required-scopes:
- onboarding:write
/v1/organizations/{organization_id}/capabilities/destination-restrictions:
post:
description: Active workspaces only. Store customer narrowing independently of operator-granted capabilities. countries=null removes only this extra restriction; a non-empty array narrows calls and SMS to those available countries. No activation, spending, caller-ID or operator permission changes. revision must match destination_revision from GET capabilities; stale edits fail without writes. Runtime always intersects with current workspace, platform and number rules.
operationId: setDestinationRestrictions
parameters:
- in: path
name: organization_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
countries:
items:
pattern: ^[A-Z]{2}$
type: string
maxItems: 300
minItems: 1
type:
- array
- 'null'
revision:
minimum: 0
type: integer
required:
- countries
- revision
type: object
required: true
responses:
'200':
description: Saved countries and incremented revision
'400':
description: Invalid, stale or inactive selection; no changes
'403':
description: Workspace access denied
summary: Set optional workspace destination restrictions
tags:
- Account
x-required-scopes:
- onboarding:write
/v1/organizations/{organization_id}/capabilities/limit-requests:
post:
operationId: requestHigherLimits
parameters:
- in: path
name: organization_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
reason:
maxLength: 2000
minLength: 10
type: string
required:
- reason
type: object
required: true
responses:
'201':
description: Review id and status
'400':
description: Inactive workspace or invalid reason
'403':
description: Workspace access denied
summary: Request higher limits without changing current permissions or buying a plan
tags:
- Account
x-required-scopes:
- onboarding:write
/v1/workspace-context:
get:
description: A tenant-bound bootstrap read for an organization-bound credential. The route derives the organization exclusively from the bearer principal and rejects organization_id rather than accepting an arbitrary tenant selector. It returns only organization id/name and project id/name/environment in stable created_at,id order, with an exact count and explicit page metadata. It works for an empty-agent starter workspace and never reads users, credentials, provider/operator data, or secrets; it makes no provider call and performs no write, repair, or lazy creation.
operationId: getWorkspaceContext
parameters:
- in: query
name: limit
required: false
schema:
default: 50
maximum: 100
minimum: 1
type: integer
- in: query
name: offset
required: false
schema:
default: 0
maximum: 100000
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkspaceContext'
description: Safe organization context and bounded project page
'400':
description: organization_id was supplied or a page value is malformed
'403':
description: Credential is not linked to an organization
'404':
description: The organization bound to the credential no longer exists
summary: Discover the bearer API key's own organization and bounded projects
tags:
- Account
x-required-scopes:
- account:read
components:
schemas:
CapabilitiesRequest:
properties:
accepted_by:
type: string
all_countries:
description: 'True authorizes every destination except the sanctioned set and ignores `countries`. Exactly one of `all_countries: true` or a non-empty `countries` is required; a request with neither is refused with 400 and nothing is written.'
type: boolean
channels:
description: Omitted or empty falls back to the selected profiles' own channels.
items:
enum:
- voice
- sms
type: string
type: array
countries:
description: The destination allowlist as ISO 3166-1 alpha-2 codes, used when `all_countries` is not true. An empty list is refused, and so is any entry that is not a well-formed two-letter code once normalized (the refusal names it). A few aliases are normalized (UAE, USA, UK).
items:
type: string
minItems: 1
type: array
limits:
additionalProperties:
type: integer
description: Optional cap overrides; `live_call_concurrency` is always taken from the plan and never from this payload.
type: object
metadata:
description: 'Free-form notes merged into the record. `calling_rules` and the retired `metadata.operational_profile` key are refused here: calling rules are set during Skysay approval.'
type: object
policy_version:
description: Accepting the outbound policy here is what makes immediate activation possible for a verified workspace; without it the request goes to review.
type: string
profiles:
description: At least one valid use-case profile. Unknown keys are dropped; a selection with none left is refused.
items:
enum:
- personal_assistant
- business_support
- appointments_reservations
- payment_reminder
- internal_operations
- customer_outreach
- implementation_services_custom
type: string
minItems: 1
type: array
required:
- profiles
type: object
CapabilitiesDetail:
description: The record, its calling rules, the profiles the workspace may select from, and live usage against its caps.
properties:
available_profiles:
items:
$ref: '#/components/schemas/CapabilitiesProfile'
type: array
calling_rules:
description: The customer-visible projection of the application calling rules recorded during Skysay approval (effective period, time zone, calling windows, per-case cadence and attempt cap, escalation actions), or null when none apply. Configured by Skysay, never by this API.
type:
- object
- 'null'
calling_rules_active:
description: True when calling rules are set and the record is active, i.e. they are enforced on every call right now.
type: boolean
capabilities:
$ref: '#/components/schemas/Capabilities'
generated_at:
type: string
usage:
$ref: '#/components/schemas/CapabilitiesUsage'
type: object
CapabilitiesPolicyAcceptance:
properties:
accepted_by:
type: string
policy_version:
description: Required unless the record already carries one.
type: string
type: object
OffsetPage:
properties:
has_more:
type: boolean
limit:
minimum: 1
type: integer
next_offset:
minimum: 0
type:
- integer
- 'null'
offset:
minimum: 0
type: integer
returned_count:
minimum: 0
type: integer
required:
- limit
- offset
- returned_count
- has_more
- next_offset
type: object
WorkspaceContext:
properties:
organization:
properties:
id:
type: string
name:
type: string
required:
- id
- name
type: object
project_count:
description: Exact number of projects in the bearer organization.
minimum: 0
type: integer
projects:
items:
properties:
environment:
type: string
id:
type: string
name:
type: string
required:
- id
- name
- environment
type: object
type: array
projects_page:
$ref: '#/components/schemas/OffsetPage'
required:
- organization
- project_count
- projects
- projects_page
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
Capabilities:
description: 'The workspace''s capabilities record: what it may do outbound. One per workspace, always. `active` authorizes outbound within the listed profiles, channels, destinations and limits; every other status authorizes nothing new.'
properties:
all_countries:
description: 'True: every destination except the sanctioned set is authorized and `countries` is empty. False: `countries` is the explicit allowlist. A new workspace starts with it true; a request chooses.'
type: boolean
approved_at:
type:
- string
- 'null'
approved_by:
description: '`self_serve` for a request approved within the catalog, the operator who approved it, or the verification door that activated it.'
type: string
approved_profiles:
items:
enum:
- personal_assistant
- business_support
- appointments_reservations
- payment_reminder
- internal_operations
- customer_outreach
- implementation_services_custom
type: string
type: array
calling_rules:
description: The application calling rules an operator recorded on approval; `{}` when none apply.
type: object
channels:
items:
enum:
- voice
- sms
type: string
type: array
compliance_profile_id:
description: The verified business profile the record was activated against; empty until verification clears.
type: string
countries:
description: The destination allowlist as ISO 3166-1 alpha-2 codes when `all_countries` is false. A call or text to any other country is held for review.
items:
type: string
type: array
created_at:
type: string
customer_visible_message:
description: Server-composed status sentence for the workspace; display as-is.
type: string
destination_restrictions:
description: Optional customer narrowing, intersected with current capabilities at admission. null means no additional customer restriction.
items:
type: string
type:
- array
- 'null'
destination_revision:
description: Revision required when saving optional destination restrictions.
type: integer
id:
type: string
limits:
additionalProperties:
type: integer
description: The profile caps projected into the workspace's risk controls at its last activation or approval (per-day/per-minute call and SMS counts, unique destinations, daily voice and wallet spend in minor units). Empty when no profile caps were projected. The caps enforced right now are the workspace's risk controls, which Skysay may have changed since.
type: object
metadata:
type: object
organization_id:
type: string
policy_accepted_at:
type:
- string
- 'null'
policy_accepted_by:
type: string
policy_version:
type: string
status:
enum:
- not_activated
- pending_review
- active
- suspended
type: string
updated_at:
type: string
type: object
CapabilitiesUsage:
description: Live usage for the same rolling windows the record's limits are expressed in.
properties:
outbound_calls_last_day:
type: integer
outbound_calls_last_minute:
type: integer
sms_last_day:
type: integer
unique_destinations_last_day:
type: integer
wallet_spend_last_day_minor:
type: integer
type: object
CreateOrganization:
properties:
name:
type: string
project_name:
type: string
required:
- name
type: object
CapabilitiesProfile:
description: 'One selectable use-case profile: its channels and the caps it grants by default. Profiles never limit who you call or why: purpose and recipient type are recorded, never judged, and one-to-one calls and texts to any number in an allowed destination country go ahead within the caps and the other pre-dial checks. A profile sets channels and default caps; only the custom implementation-services profile sends campaign launches and batches to review, apart from an SMS campaign, which goes to review under any profile for its carrier registration.'
properties:
channels:
items:
enum:
- voice
- sms
type: string
type: array
default_caps:
additionalProperties:
type: integer
type: object
description:
type: string
key:
enum:
- personal_assistant
- business_support
- appointments_reservations
- payment_reminder
- internal_operations
- customer_outreach
- implementation_services_custom
type: string
label:
type: string
type: object
securitySchemes:
ApiKeyBearer:
description: 'A scoped sky_ API key, sent as Authorization: Bearer sky_...'
scheme: bearer
type: http