Relay SMS Platform
Relay SMS API

Schemas


Message

  • idstring · required
    Example: msg_kL9mN2pQ4rS6tU8vW0xY
  • tostring · required
    Example: +15551234567
  • fromstring · required
    Example: +19285979076
  • messagestring · required
    Example: Hello from Relay!
  • statusstring · enum · required
    Enum values:
    queued
    pending
    sent
    delivered
    failed
    Example: queued
  • directionstring · enum · required
    Enum values:
    inbound
    outbound
    Example: outbound
  • created_atstring · date-time · required
    Example: 2024-01-15T10:30:00Z
  • aws_message_idstring
    Example: us-east-1/abc123def456

ApiKeySummary

  • idstring
  • namestring
  • masked_secretstring
  • created_atstring · date-time
  • last_used_atstring | null · date-time

Pagination

  • pageinteger
    Example: 1
  • limitinteger
    Example: 20
  • totalinteger
    Example: 87
  • hasMoreboolean
    Example: true

ApiKeyPagination

  • pageinteger
    Example: 1
  • limitinteger
    Example: 20
  • totalinteger
    Example: 3
  • totalPagesinteger
    Example: 1

Error

  • successboolean · required
    Example: false
  • errorstring · required
    Example: validation_error
  • messagestring · required
    Example: Invalid phone number format
  • timestampstring · date-time · required
    Example: 2024-06-01T12:34:56.789Z
  • contextobject | null

    Optional error context (only present in development mode)

    Example: {"field":"to","value":"+15551234567"}

AvailablePhoneNumber

  • phone_numberstring
    Example: +15005550006
  • localitystring
    Example: CA
  • capabilitiesobject
  • monthly_cost_centsinteger

    Monthly cost in integer minor currency units (cents).

    Example: 150
  • currencystring

    ISO 4217 currency code

    Example: USD
  • monthly_costnumber · float · deprecated · required

    Deprecated. Float dollars. Use monthly_cost_cents going forward.

    Example: 1.5

PhoneNumber

  • idstring · uuid
  • workspace_idstring · uuid
  • phone_numberstring
    Example: +15005550006
  • providerstring
    Example: mock
  • provider_idstring
  • capabilitiesobject
  • monthly_cost_centsinteger
  • currencystring
    Example: USD
  • statusstring · enum
    Enum values:
    active
    released
    pending
  • created_atstring · date-time
  • released_atstring | null · date-time
  • monthly_costnumber · float · deprecated · required

WebhookInput

  • urlstring · uri · required

    HTTPS endpoint to deliver events to. Must not resolve to a private network.

  • eventsstring[] · minItems: 1 · required
    Enum values:
    message.sent
    message.delivered
    message.failed
    message.status.updated
    Example: ["message.status.updated"]

Webhook

  • idstring · uuid
  • workspace_idstring · uuid
  • urlstring · uri
  • eventsstring[]
    Enum values:
    message.sent
    message.delivered
    message.failed
    message.status.updated
  • created_atstring · date-time
  • updated_atstring · date-time

WebhookWithSecret

  • idstring · uuid
  • workspace_idstring · uuid
  • urlstring · uri
  • eventsstring[]
    Enum values:
    message.sent
    message.delivered
    message.failed
    message.status.updated
  • created_atstring · date-time
  • updated_atstring · date-time
  • signing_secretstring

    HMAC-SHA256 signing secret for this webhook. Returned exactly once at create / rotate time.

    Example: whsec_3a7b1f9c4d2e8b6a5c0d9e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b
  • signing_secret_warningstring

    Human-readable reminder that this is a one-shot value.

WebhookDelivery

  • idstring · uuid

    Unique delivery attempt identifier.

  • webhook_idstring · uuid
  • eventstring · enum
    Enum values:
    message.sent
    message.delivered
    message.failed
    message.status.updated
    test.webhook.sent
  • status_codeinteger | null

    HTTP response code, or null if the request failed at the network layer.

  • response_bodystring

    Truncated response body (max 1000 chars).

  • delivered_atstring · date-time
  • testboolean | null

MessageAnalytics

  • inboundobject

    Map of status -> count for inbound messages

  • outboundobject

    Map of status -> count for outbound messages

  • totalinteger
  • summaryobject

CostAnalytics

  • periodstring
  • total_centsinteger

    Total cost in integer minor currency units (cents).

  • currencystring
    Example: USD
  • breakdownobject
  • totalnumber · deprecated · required

    Deprecated. Float dollars. Use total_cents going forward.

User

  • idstring · uuid
  • emailstring · email

    The authenticated user's own email address, returned in full. PII masking policy applies to logs and monitoring but not to first-party profile responses.

  • namestring
  • workspace_idstring · uuid
  • created_atstring · date-time

Workspace

  • idstring · uuid
  • namestring
  • default_phone_numberstring | null
  • plan_typestring · enum
    Enum values:
    free
    starter
    growth
    scale
    enterprise
  • created_atstring · date-time

WorkspaceMember

  • user_idstring · uuid
  • emailstring · email

    Member email returned in full to workspace members. All workspace members can see each other's email addresses, consistent with standard team-tool behavior.

  • namestring
  • rolestring · enum
    Enum values:
    owner
    admin
    member
  • joined_atstring · date-time