Relay SMS Platform
Relay SMS API

API Keys

Endpoint

Manage API keys


List API keys

GET
https://api.relay.works
/v1/api-keys

List all API keys for the workspace

List API keysquery Parameters

  • pageinteger · min: 1

    Page number

    Default: 1
  • limitinteger · min: 1 · max: 100

    Number of keys per page

    Default: 20

List API keys Responses

List of API keys

  • dataobject[]
  • paginationobject

Create API key

POST
https://api.relay.works
/v1/api-keys

Create a new API key. Returns a reveal token that must be used within 5 minutes.

Create API key Request Body

  • namestring · required

    Descriptive name for the API key

    Example: Production API Key

Create API key Responses

API key created successfully

  • idstring
    Example: key_abc123
  • namestring
    Example: Production API Key
  • masked_secretstring
    Example: rly_1234...5678
  • reveal_tokenstring
    Example: a1b2c3d4e5f6g7h8i9j0
  • expires_ininteger

    Token expiry in seconds

    Example: 300
  • created_atstring · date-time
  • last_used_atstring | null · date-time

Delete API key

DELETE
https://api.relay.works
/v1/api-keys/{id}

Delete an API key by its ID. This action is irreversible and will immediately revoke access for any clients using this key.

Delete API keypath Parameters

  • idstring · required

    The ID of the API key to delete (e.g., "key_abc123")

Delete API key Responses

API key deleted successfully. No content returned.

No data returned

Reveal API key secret

POST
https://api.relay.works
/v1/api-keys/reveal

Use reveal token to get the actual API key secret (one-time only)

Reveal API key secret Request Body

  • reveal_tokenstring · required
    Example: a1b2c3d4e5f6g7h8i9j0

Reveal API key secret Responses

API key revealed

  • secretstring
    Example: rly_1234567890abcdef
  • messagestring
    Example: API key revealed successfully