Account

Update account settings

PATCH /v1/account

Sets low_balance_threshold: credits.low (an event and an email to the owner) fires once each time a request takes the balance from above it to at or below it; credits.depleted fires when the balance reaches 0. Free.

Auth: an API key with the admin scope, or the dashboard session.

Test mode: A test key's change is validated and answered but not stored: test mode never changes the live account.

Example

cURL
curl -X PATCH 'https://staging.socialtap.dev/v1/account' \
  -H "x-api-key: $SOCIALTAP_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "low_balance_threshold": 0
}'
x-api-keystringheaderrequired

Your API key, with the admin scope. Authentication

Body

application/json

JSON. Fields marked nullable may be null; optional ones may be left out.

FieldTypeDescription
low_balance_thresholdinteger or nullCredits; null turns credits.low off. Setting it never fires the event by itself: only a request that crosses it does.
low_balance_thresholdintegernullable

Credits; null turns credits.low off. Setting it never fires the event by itself: only a request that crosses it does.

Response

application/json

200

Update account settings

FieldTypeDescription
dataobject
data.api_keyobject or nullThe key that made this request; null for a dashboard session.
data.api_key.created_atstring (date-time)When the key was created, RFC 3339 UTC.
data.api_key.expires_atstring (date-time) or nullWhen the key stops working, RFC 3339 UTC; null when it never expires.
data.api_key.idstringKey ID (key_…): manage the key with it. It is not the secret.
data.api_key.ip_allowliststring[]IP addresses or CIDR ranges (IPv4 or IPv6) the key works from; [] = any.
data.api_key.last_used_atstring (date-time) or nullAbout when the key was last used (updated at most hourly); null when never.
data.api_key.modestringlive keys spend credits on real requests; test keys answer from recorded responses, free.
One of live, test
data.api_key.namestringYour label for the key.
data.api_key.objectstringAlways api_key.
One of api_key
data.api_key.prefixstringThe secret's first characters, to recognize it.
data.api_key.revoked_atstring (date-time) or nullWhen the key was revoked; null while it is not.
data.api_key.scopesstring[]What the key may call: endpoints (data endpoints), jobs, account:read (account, usage, ledger, keys), admin (account settings and key management; includes account:read).
One of endpoints, jobs, account:read, admin
data.api_key.spend_limitobject or nullThe key's spend limit and what it used this interval; null when the key has none.
data.api_key.statusstringpending: created by an agent signup and waiting for the owner's email confirmation (it can only read GET /v1/account). expired: past expires_at.
One of active, pending, expired, revoked
data.availableintegerCredits new requests can set aside now: balance minus what requests in flight and unfinished jobs hold. For a busy account it may lag concurrent requests by about a second.
data.balanceintegerCredits the account owns, including those held by requests in flight and unfinished jobs; for a test key, the fixed test balance.
data.created_atstring (date-time)When the account was created, RFC 3339 UTC.
data.emailstringThe owner's email address: sign-in links, receipts and balance alerts go there.
data.idstringAccount ID (acct_…).
data.low_balance_thresholdinteger or nullcredits.low fires (event and email) when a request takes the balance from above this to at or below it; null when off.
data.modestringMode of the credential that made this request. A test key sees the fixed test balance.
One of live, test
data.objectstringAlways account.
One of account
data.planstringPlan ID.
data.statusstringunverified: created by an agent signup whose owner has not confirmed by email yet (no free credits, live keys pending).
One of active, unverified
metaobjectThe shared route meta (see the API reference introduction).
dataobject
ShowHide 11 child fields
api_keyobjectnullable

The key that made this request; null for a dashboard session.

ShowHide 13 child fields
created_atstring date-time

When the key was created, RFC 3339 UTC.

expires_atstring date-timenullable

When the key stops working, RFC 3339 UTC; null when it never expires.

idstring

Key ID (key_…): manage the key with it. It is not the secret.

ip_allowliststring[]

IP addresses or CIDR ranges (IPv4 or IPv6) the key works from; [] = any.

last_used_atstring date-timenullable

About when the key was last used (updated at most hourly); null when never.

modestring

live keys spend credits on real requests; test keys answer from recorded responses, free.

One oflivetest

namestring

Your label for the key.

objectstring

Always api_key.

One ofapi_key

prefixstring

The secret's first characters, to recognize it.

revoked_atstring date-timenullable

When the key was revoked; null while it is not.

scopesstring[]

What the key may call: endpoints (data endpoints), jobs, account:read (account, usage, ledger, keys), admin (account settings and key management; includes account:read).

One ofendpointsjobsaccount:readadmin

spend_limitobjectnullable

The key's spend limit and what it used this interval; null when the key has none.

statusstring

pending: created by an agent signup and waiting for the owner's email confirmation (it can only read GET /v1/account). expired: past expires_at.

One ofactivependingexpiredrevoked

availableinteger

Credits new requests can set aside now: balance minus what requests in flight and unfinished jobs hold. For a busy account it may lag concurrent requests by about a second.

balanceinteger

Credits the account owns, including those held by requests in flight and unfinished jobs; for a test key, the fixed test balance.

created_atstring date-time

When the account was created, RFC 3339 UTC.

emailstring

The owner's email address: sign-in links, receipts and balance alerts go there.

idstring

Account ID (acct_…).

low_balance_thresholdintegernullable

credits.low fires (event and email) when a request takes the balance from above this to at or below it; null when off.

modestring

Mode of the credential that made this request. A test key sees the fixed test balance.

One oflivetest

objectstring

Always account.

One ofaccount

planstring

Plan ID.

statusstring

unverified: created by an agent signup whose owner has not confirmed by email yet (no free credits, live keys pending).

One ofactiveunverified

metaobject

The shared route meta (see the API reference introduction).

400

400 Bad Request.

CodeHTTPRetryMeaningWhat to do
invalid_input400NoThe request parameters are missing or malformed, or the URL is not a supported link for this endpoint.Fix the parameter named in param (the message says how); for a link of the wrong kind, call the endpoint the message names.

The request parameters are missing or malformed, or the URL is not a supported link for this endpoint.

Fix the parameter named in param (the message says how); for a link of the wrong kind, call the endpoint the message names.

401

401 Unauthorized.

CodeHTTPRetryMeaningWhat to do
unauthorized401NoThe x-api-key header is missing, unknown or revoked (or, on the dashboard's routes, the session cookie is missing or expired).Send a valid API key in the x-api-key header; without one, get a key at details.signup_url (AI agents: POST details.agent_signup_url).
unauthorizedNo retry

The x-api-key header is missing, unknown or revoked (or, on the dashboard's routes, the session cookie is missing or expired).

Send a valid API key in the x-api-key header; without one, get a key at details.signup_url (AI agents: POST details.agent_signup_url).

403

403 Forbidden.

CodeHTTPRetryMeaningWhat to do
forbidden403NoThe API key is valid but may not make this request: its account is suspended, its scopes do not include the route, it is waiting for its owner's email confirmation, it is past its expiry, or the request came from an IP its allowlist does not include. A running job stops the same way when its account is suspended or the key that created it is revoked or expires. It is about the key, never the item (a private item is private_or_unavailable, also 403): branch on the code.Do what details.reason says: if suspended, contact support; otherwise use a key whose scopes cover the route (details.required_scope), have the owner confirm the emailed link, create a new key, or call from an allowed IP.
forbiddenNo retry

The API key is valid but may not make this request: its account is suspended, its scopes do not include the route, it is waiting for its owner's email confirmation, it is past its expiry, or the request came from an IP its allowlist does not include. A running job stops the same way when its account is suspended or the key that created it is revoked or expires. It is about the key, never the item (a private item is private_or_unavailable, also 403): branch on the code.

Do what details.reason says: if suspended, contact support; otherwise use a key whose scopes cover the route (details.required_scope), have the owner confirm the emailed link, create a new key, or call from an allowed IP.

429

429 Too Many Requests.

CodeHTTPRetryMeaningWhat to do
rate_limited429Yes, laterThe account exceeded its runaway-protection ceiling: plans do not limit request rate, but a high per-account safety ceiling stops broken client loops. Support raises it on request. Without an API key (signup, the MCP server's tool listing and find_endpoint), requests are limited per IP address instead.Wait for the number of seconds in the retry-after header, then retry; ask support to raise the ceiling if your sustained traffic needs more (calls without an API key: use one).
rate_limitedYes, later

The account exceeded its runaway-protection ceiling: plans do not limit request rate, but a high per-account safety ceiling stops broken client loops. Support raises it on request. Without an API key (signup, the MCP server's tool listing and find_endpoint), requests are limited per IP address instead.

Wait for the number of seconds in the retry-after header, then retry; ask support to raise the ceiling if your sustained traffic needs more (calls without an API key: use one).

A test key's change is validated and answered but not stored: test mode never changes the live account.

operationId account.update