201Successful Response
Schema: SuccessEnvelope_APITokenCreateResponse_
successbooleanmessagestringcodestringdataAPITokenCreateResponse
/api/v1/tokensCreate a new API token. Requires two-factor authentication on the account and a recent verification of both factors in the current session; must be called from the DayZero web app, not with an API token.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: APITokenCreate
namestringrequiredToken name
descriptionstringOptional description
expires_in_daysintegerExpiration in days (1-365, default: 365)
business_idsarray · stringLimit the token to these businesses (UUIDs you can access). Omit for every business you can reach. A limited token gets 403 AUTH_070 on any other business, and cannot elevate around it.
scopesarray · stringToken surface. Omit for full access. read_only blocks every mutating endpoint. credit limits the token to the partner-credit API; credit:read to its GET endpoints; credit:payments to POST /api/v1/credit/payments and its settlement/reversal paths, plus GET on a line's payoff-quote and payments.
allowed_ipsarray · stringWhen set, this token is refused (403 AUTH_028) unless the request comes from one of these IPv4/IPv6 addresses or CIDR ranges, or from a named cloud preset: preset:google (Google services, where Apps Script and Google Sheets call from) or preset:aws:<region> (Amazon EC2 in that region). Presets are shared by every customer of that cloud, so they are much weaker than your own addresses. Omit or leave empty to allow any IP. Set at minting; mint a new token to change the list.
rate_limit_per_minuteintegerRequests per minute this token may make (sliding window). Omit for the platform default. Over budget the API answers 429 AUTH_058 and the token's owner is alerted.
Schema: SuccessEnvelope_APITokenCreateResponse_
successbooleanmessagestringcodestringdataAPITokenCreateResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.