auto_stories Bilgi Bankası chevron_right Data API chevron_right Makale

Data API: Authentication, limits and errors

This article is for developers calling the Xpoda Data API. It explains the base URL, how to send the key, the limits, and how errors are reported.

Base URL

https://{your-xpoda-service}/api/v1/{moduleId}
  • {your-xpoda-service} is the address of your Xpoda Service, for example service.example.com. Studio shows the full URL on the Data API Developer guide tab.
  • {moduleId} is the number of the Studio module (project) the key was created in. A key works only for its own module; another number gives 404 project_not_found.

All paths in these articles are relative to the base URL. For example GET /forms/stock-items/records means GET https://service.example.com/api/v1/7/forms/stock-items/records.

Sending the key

Send the key in a header on every request, in either form:

Authorization: Bearer xpk_...
X-Api-Key: xpk_...
  • Never put the key in the URL. A request with the key in the query string is refused with 400 key_in_query, because URLs end up in logs and browser history.
  • Requests must use HTTPS; plain HTTP is refused with 403 https_required.
  • Keep the key on a server. A key in browser or mobile app code is visible to everyone who uses the app.
  • Treat the key like a password: store it in a secret store or environment variable, not in source code.

The key carries the rights of its API user. There is no way to act as another user: the API ignores any user, ticket or customer information in the request.

Request and response format

  • Bodies are JSON: send Content-Type: application/json. Other content types are refused with 415 unsupported_media_type.
  • A request body may be at most 1 MB.
  • Responses are UTF-8 JSON.
  • Field names in JSON are the form's column names, as listed by GET /forms/{form}/schema.
Type in the schemaJSON valueExample
stringstring"Steel bolt M8"
integernumber without decimals42
numbernumber12.5 (never "12,5")
booleantrue or falsetrue
string, format date-timeISO 8601 string"2026-10-26" or "2026-10-26T14:30:00"
string, format uuidGUID string"1751e7ab-34dc-46fa-a097-17377da234ca"

Dates are returned as yyyy-MM-ddTHH:mm:ss.fff in the Xpoda server's local time, without a time zone, because that is how Xpoda stores them.

Limits

LimitValue
Requests per minute, per key600 unless the key or the installation sets another value. Above it you get 429 rate_limited with a Retry-After header (seconds).
Records per page50 by default, at most 500.
Request body1 MB.
Query time30 seconds per database query.

There is no daily quota.

Errors

Errors use the standard problem details format (application/problem+json, RFC 9457):

{
  "type": "https://docs.xpoda.com/inbound-api/errors#validation_failed",
  "title": "Unprocessable content",
  "status": 422,
  "code": "validation_failed",
  "detail": "Some fields are not valid.",
  "errors": [
    { "field": "Price", "message": "Expected a number." },
    { "field": "lines[1].Quantity", "message": "Required." }
  ]
}
  • Branch your code on code: it never changes. detail is a sentence for people and may change.
  • errors appears when individual fields are wrong, with one entry per field.
  • Unexpected server errors return 500 internal_error with no internal details; the details are written to the Xpoda Service log.

Error codes

StatuscodeMeaning and what to do
400invalid_queryThe filter, sort, fields or expand parameter is wrong. detail says where.
400invalid_pagingpage is below 1 or pageSize is out of range.
400invalid_bodyThe body is not valid JSON, or not a JSON object.
400key_in_queryThe key was sent in the URL. Send it in a header.
400invalid_idempotency_keyThe Idempotency-Key header is longer than 200 characters.
401missing_keyNo key was sent.
401invalid_keyThe key is wrong or unknown.
401key_revokedThe key was revoked in Studio. Ask for a new key.
401key_expiredThe key's expiry date has passed.
403https_requiredThe request was made over plain HTTP.
403ip_not_allowedThe calling IP address is not in the key's allowed list.
403service_user_inactiveThe key's API user was deactivated.
403scope_missingThe key does not have this permission (read, create, update, delete) for the form.
403form_not_in_menuThe form is not in the API user's menu.
403form_authorityThe API user's form authorities do not allow this operation.
404project_not_foundThe module number in the URL is not the key's module.
404form_not_foundNo form with this API name is available to the key.
404record_not_foundNo record with this id.
404api_disabledThe Data API is switched off on this installation.
409request_in_progressA request with the same Idempotency-Key is still running. Retry shortly.
412precondition_failedThe record changed after you read it. Read it again and retry with the new ETag.
413body_too_largeThe body is over 1 MB.
415unsupported_media_typeThe body is not sent as application/json.
422validation_failedUnknown fields, wrong types, missing required values or read-only fields. See errors.
422action_rejectedA Record Control rule of the form refused the change. detail has the form's message.
422save_rejectedThe form's save refused the record (for example a database rule). detail has the message.
422delete_rejectedThe record could not be deleted.
422idempotency_key_reusedThe Idempotency-Key was already used with a different body.
428precondition_requiredAn update or delete was sent without If-Match.
429rate_limitedToo many requests. Wait the number of seconds in Retry-After.
500internal_errorUnexpected error. Retry later; if it persists, contact support with the time of the request.

Retrying

  • Safe to retry after a pause: 429, 500, 409 request_in_progress, and network errors on GET.
  • For POST, send an Idempotency-Key so a retry after a network error does not create the record twice (see Data API: Writing records).
  • Do not retry 4xx errors unchanged: fix the request first.