New: every plan now includes free incoming texts and rollover credits. See pricing →
Search Help Center Documentation

API reference

Conversations

The shared inbox: one conversation per phone number, with every text in and out. List and search conversations, read them, text people one-to-one, and set status (open, pending, closed) and assignment.

List conversations

GET/v1/conversations

The inbox: one conversation per phone number, most recent first. Every text that comes in opens (or reopens) one; texts you send show up in them too.

Choose a folder: all, unread, open, pending, closed or unassigned. The mine... folders are for teammates logged in to the dashboard and are always empty with an API key.

Request

curl https://app.smsblast.net/v1/conversations \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/conversations', {
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.get(
    "https://app.smsblast.net/v1/conversations",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "conversations": [
    {
      "id": "6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
      "phone": "+14155550101",
      "contact_id": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
      "first_name": "Alice",
      "last_name": "Moreno",
      "contact_status": "subscribed",
      "status": "open",
      "assigned_user_id": null,
      "assigned_name": null,
      "unread": 1,
      "last_message_at": "2026-11-20T16:45:03.118Z",
      "last_message_preview": "Do you have rye bread today?",
      "last_direction": "inbound"
    }
  ]
}

Needs an API key: Authorization: Bearer sb_... Authentication

Query parameters#

folderstring

Which folder. Unknown values mean all.

One of "all", "unread", "open", "pending", "closed", "unassigned", "mine", "mine_unread", "mine_open", "mine_pending". Default "all".

searchstring

Text to look for in the contact's first or last name and the last message, or (3 or more digits) the phone number.

limitinteger

How many to return, 1 to 200. Default 50.

Default 50. Limits: 1 to 200.

offsetinteger

How many to skip, for paging. Default 0.

Default 0. Limits: at least 0.

Responses#

200

Conversations.

application/json

conversationsarray of objectsrequired

Most recent first.

Fields of each item
idstringuuidrequired

The conversation id.

phonestringrequired

The person's number, E.164. There is one conversation per number.

contact_idstringuuidnullablerequired

Their contact, when they are one.

first_namestringnullablerequired

The contact's first name.

last_namestringnullablerequired

The contact's last name.

contact_statusstringnullablerequired

The contact's status, when there is a contact. Only subscribed contacts can be texted.

One of "subscribed", "unsubscribed", null.

statusstringrequired

Your team's status for it. A closed conversation opens again when the person texts.

One of "open", "pending", "closed".

assigned_user_idstringuuidnullablerequired

The teammate it is assigned to.

assigned_namestringnullablerequired

That teammate's name.

unreadintegerrequired

Incoming texts not read yet.

last_message_atstringdate-timerequired

When the last text came in or went out.

last_message_previewstringnullablerequired

The start of the last text (up to 160 characters).

last_directionstringnullablerequired

Whether the last text came in or went out.

One of "inbound", "outbound", null.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Text someone from the inbox

POST/v1/conversations

Sends a one-to-one text to a subscribed contact and puts it in their conversation (starting one if needed). It goes out at once, from the number you last used with them (or your first approved number). Text only: no pictures, no personalisation.

Credits are taken when the text is queued: 1 per SMS segment (160 plain characters, or 153 per segment once a text is split; 70 and 67 when it contains an emoji or another character outside GSM-7), or 3 for a picture message. A text that cannot be sent, or is skipped because the person opted out first, gets its credits back.

Texts only go to subscribed contacts. Sending needs an approved (active) sending number and, once the 14-day free trial is over, a paid plan.

Request

curl -X POST https://app.smsblast.net/v1/conversations \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+14155550101",
    "body": "Hi Alice, we saved you a rye loaf. It is at the counter until 3pm."
  }'
const res = await fetch('https://app.smsblast.net/v1/conversations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    phone: '+14155550101',
    body: 'Hi Alice, we saved you a rye loaf. It is at the counter until 3pm.',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/conversations",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "phone": "+14155550101",
        "body": "Hi Alice, we saved you a rye loaf. It is at the counter until 3pm.",
    },
)
print(res.status_code, res.json())
Response · 201
{
  "messageId": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
  "conversationId": "6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
  "credits": 1
}

Needs an API key: Authorization: Bearer sb_... Authentication

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

phonestringrequired

Who to text. A US or Canada mobile number in any common format (+14155550101, (415) 555-0101, 415-555-0101). Stored and returned in E.164 (+14155550101). They must be a subscribed contact.

bodystringrequired

The text, up to 1,600 characters. Text only, no pictures or personalisation.

Limits: up to 1600 characters.

Example request body
Request body
{
  "phone": "+14155550101",
  "body": "Hi Alice, we saved you a rye loaf. It is at the counter until 3pm."
}

Responses#

201

The text, queued.

application/json

messageIdstringuuidrequired

The text, queued to go out now. Look it up with GET /v1/messages/{id}.

conversationIdstringuuidrequired

The conversation it is in.

creditsintegerrequired

Credits it cost.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • empty_body: body is missing or empty.
  • body_too_long: body is longer than 1,600 characters.
  • invalid_phone: phone is not a valid US or Canada mobile number.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

402

Sending is not possible right now. error.code is one of:

  • insufficient_credits: Your credit balance is too low for this. error.details has needed and available.
  • trial_ended: The 14-day free trial is over. Choose a plan on the Billing page of the dashboard to keep sending.
  • plan_required: Your paid plan has ended. Choose a plan on the Billing page of the dashboard to keep sending.
409

The request clashes with the current state of things. error.code is one of:

  • not_a_contact: The number is not one of your contacts.
  • unsubscribed: The contact has opted out.
  • blocked: The number is blocked on SMSBlast (by SMSBlast staff, for every account) and cannot be texted.
  • no_active_number: You have no approved sending number yet.
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Count conversations by folder

GET/v1/conversations/counts

How many conversations each inbox folder holds. The mine... counts are always 0 with an API key.

Request

curl https://app.smsblast.net/v1/conversations/counts \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/conversations/counts', {
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.get(
    "https://app.smsblast.net/v1/conversations/counts",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "counts": {
    "all": 148,
    "unread": 5,
    "open": 22,
    "pending": 3,
    "closed": 123,
    "unassigned": 19,
    "mine": 0,
    "mine_unread": 0,
    "mine_open": 0,
    "mine_pending": 0
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Responses#

200

The counts.

application/json

countsobjectrequired

How many conversations each inbox folder holds.

Child fields
allintegerrequired

All conversations.

unreadintegerrequired

With unread texts.

openintegerrequired

Open.

pendingintegerrequired

Pending.

closedintegerrequired

Closed.

unassignedintegerrequired

Not assigned to anyone and not closed.

mineintegerrequired

Assigned to you. Always 0 with an API key, which belongs to no teammate.

mine_unreadintegerrequired

Assigned to you and unread. Always 0 with an API key.

mine_openintegerrequired

Assigned to you and open. Always 0 with an API key.

mine_pendingintegerrequired

Assigned to you and pending. Always 0 with an API key.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Get a conversation

GET/v1/conversations/{id}

One conversation and its latest 200 texts (oldest first), whichever of your numbers they went through. Skipped texts are left out. Reading it does not mark it read: use PATCH with read: true.

Request

curl https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18', {
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.get(
    "https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "conversation": {
    "id": "6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
    "phone": "+14155550101",
    "contact_id": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
    "first_name": "Alice",
    "last_name": "Moreno",
    "contact_status": "subscribed",
    "status": "open",
    "assigned_user_id": null,
    "assigned_name": null,
    "unread": 1,
    "last_message_at": "2026-11-20T16:45:03.118Z",
    "last_message_preview": "Do you have rye bread today?",
    "last_direction": "inbound"
  },
  "messages": [
    {
      "id": "e5a7c9e1-3b5d-4f7a-9c1e-3b5d7f9a1c2d",
      "direction": "outbound",
      "kind": "campaign",
      "body": "Hi Alice! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
      "status": "delivered",
      "created_at": "2026-11-19T17:00:00.412Z",
      "user_name": null,
      "campaign_name": "Holiday stollen"
    },
    {
      "id": "d1f3a5c7-9e0b-4d2f-a4c6-e8f0b2d4f697",
      "direction": "inbound",
      "kind": "inbound",
      "body": "Do you have rye bread today?",
      "status": "received",
      "created_at": "2026-11-20T16:45:03.118Z",
      "user_name": null,
      "campaign_name": null
    }
  ]
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The conversation id.

Responses#

200

The conversation and its texts.

application/json

conversationobjectrequired

The thread of texts with one phone number, as the inbox shows it. Field names are snake_case.

Child fields
idstringuuidrequired

The conversation id.

phonestringrequired

The person's number, E.164. There is one conversation per number.

contact_idstringuuidnullablerequired

Their contact, when they are one.

first_namestringnullablerequired

The contact's first name.

last_namestringnullablerequired

The contact's last name.

contact_statusstringnullablerequired

The contact's status, when there is a contact. Only subscribed contacts can be texted.

One of "subscribed", "unsubscribed", null.

statusstringrequired

Your team's status for it. A closed conversation opens again when the person texts.

One of "open", "pending", "closed".

assigned_user_idstringuuidnullablerequired

The teammate it is assigned to.

assigned_namestringnullablerequired

That teammate's name.

unreadintegerrequired

Incoming texts not read yet.

last_message_atstringdate-timerequired

When the last text came in or went out.

last_message_previewstringnullablerequired

The start of the last text (up to 160 characters).

last_directionstringnullablerequired

Whether the last text came in or went out.

One of "inbound", "outbound", null.

messagesarray of objectsrequired

The latest 200 texts with this number (from any of your numbers), oldest first.

Fields of each item
idstringuuidrequired

The message id.

directionstringrequired

Sent or received.

One of "outbound", "inbound".

kindstringrequired

What sent it, as in Message.kind.

bodystringrequired

The text.

statusstringrequired

Its status, as in Message.status (skipped texts are left out).

created_atstringdate-timerequired

When it was created or received.

user_namestringnullablerequired

The teammate who sent it from the dashboard inbox.

campaign_namestringnullablerequired

The campaign it was part of.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No conversation with that id in your account.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Update a conversation

PATCH/v1/conversations/{id}

Sets a conversation's status, assigns it to a teammate (or unassigns it with null), or marks it read. Only the fields you send change; values that are not allowed are ignored, and a body with nothing to change answers ok without checking the conversation exists.

Request

curl -X PATCH https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "pending",
    "assignedUserId": "9d1f3b5c-7e9a-4b1d-8c3f-5a7c9e1b3d63",
    "read": true
  }'
const res = await fetch('https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    status: 'pending',
    assignedUserId: '9d1f3b5c-7e9a-4b1d-8c3f-5a7c9e1b3d63',
    read: true,
  }),
});
console.log(res.status, await res.json());
import os

import requests

res = requests.patch(
    "https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
    json={
        "status": "pending",
        "assignedUserId": "9d1f3b5c-7e9a-4b1d-8c3f-5a7c9e1b3d63",
        "read": True,
    },
)
print(res.status_code, res.json())
Response · 200
{
  "ok": true
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The conversation id.

Request body#

application/json · required

Only the fields you send change. Values that are not one of the allowed ones are ignored.

statusstring

The new status.

One of "open", "pending", "closed".

assignedUserIdstringuuidnullable

A teammate's user id, or null to unassign. Teammate ids appear as assigned_user_id on conversations and in GET /v1/analytics/inbox.

readboolean

true marks every text in it as read.

Always true.

Example request body
Request body
{
  "status": "pending",
  "assignedUserId": "9d1f3b5c-7e9a-4b1d-8c3f-5a7c9e1b3d63",
  "read": true
}

Responses#

200

Updated.

application/json

okbooleanrequired

Always true.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_json: The body is not a JSON object.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No conversation with that id, or assignedUserId is not one of your teammates.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Reply in a conversation

POST/v1/conversations/{id}/messages

Sends a text in a conversation, to its phone number, and marks the conversation read. The person must be a subscribed contact. It goes out at once, from the number you last used with them. Text only.

Credits are taken when the text is queued: 1 per SMS segment (160 plain characters, or 153 per segment once a text is split; 70 and 67 when it contains an emoji or another character outside GSM-7), or 3 for a picture message. A text that cannot be sent, or is skipped because the person opted out first, gets its credits back.

Request

curl -X POST https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18/messages \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Yes, we have rye today until 3pm."
  }'
const res = await fetch('https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18/messages', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    body: 'Yes, we have rye today until 3pm.',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/conversations/6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18/messages",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "body": "Yes, we have rye today until 3pm.",
    },
)
print(res.status_code, res.json())
Response · 201
{
  "messageId": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
  "conversationId": "6b8d0f2a-4c6e-4a8c-9e0b-2d4f6a8c0e18",
  "credits": 1
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The conversation id.

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

bodystringrequired

The text, up to 1,600 characters. Text only.

Limits: up to 1600 characters.

Example request body
Request body
{
  "body": "Yes, we have rye today until 3pm."
}

Responses#

201

The text, queued.

application/json

messageIdstringuuidrequired

The text, queued to go out now. Look it up with GET /v1/messages/{id}.

conversationIdstringuuidrequired

The conversation it is in.

creditsintegerrequired

Credits it cost.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • empty_body: body is missing or empty.
  • body_too_long: body is longer than 1,600 characters.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

402

Sending is not possible right now. error.code is one of:

  • insufficient_credits: Your credit balance is too low for this. error.details has needed and available.
  • trial_ended: The 14-day free trial is over. Choose a plan on the Billing page of the dashboard to keep sending.
  • plan_required: Your paid plan has ended. Choose a plan on the Billing page of the dashboard to keep sending.
404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No conversation with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • not_a_contact: The number is not one of your contacts.
  • unsubscribed: The contact has opted out.
  • blocked: The number is blocked on SMSBlast (by SMSBlast staff, for every account) and cannot be texted.
  • no_active_number: You have no approved sending number yet.
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.