---
title: "ErrorCode"
url: "https://developer-staging.agentsync.io/apis/platform-api/versions/8177e94d-86f2-48a5-8ed6-d5fbcb69f38a/schemas/ErrorCode"
---

> Full API specification: https://developer-staging.agentsync.io/apis/platform-api/versions/8177e94d-86f2-48a5-8ed6-d5fbcb69f38a.md

# ErrorCode

Every error code that applies across the API, as the message of the details entry whose param is "code". A code is never renamed or repurposed. parameter_invalid is a 400, a parameter is missing, malformed or out of range. token_invalid is a 401, the token is missing, malformed, expired or wrongly signed. caller_not_service_account is a 403, the token identifies a person. caller_claims_missing is a 403, the token lacks a usable organization or service account claim. scope_missing is a 403, the token lacks the scope the operation requires. role_missing is a 403, the service account no longer holds a role at its organization that may call the operation (its grant was revoked or it was disabled). route_not_found is a 404, no operation serves the path; operations that look a record up declare their own <entity>_not_found codes. contract_not_found, contract_assignment_not_found, producer_not_found, task_not_found and requirement_set_not_found are each a 404 for a record that does not exist or that the caller's organization may not see; the two are answered alike. file_not_found is a 404, the task has no file you may download at the slot. file_scan_pending is a 409, the file's malware scan has not finished; try again after Retry-After seconds. file_unavailable is a 409, the file cannot be downloaded because its malware scan did not find it clean. assignments_over_cap is a 422, the producer holds more contract assignments that are not terminated than the detail serves; page through the contract assignments list instead, skipping those whose status is terminated. producer_roster_too_large is a 422, the producer holds no contract assignment that is not terminated under your organization's contracts and its producer roster is longer than the API searches. method_not_allowed is a 405, the path exists but not for this method. rate_limit_exceeded is a 429, requests are arriving too fast; a 429 from the API gateway may arrive without it. internal_error is a 500, the service failed in a way the caller cannot fix. service_unavailable is a 503, a platform service this API depends on could not answer. upstream_auth_unavailable is a 503, the API could not get its own credentials for a platform service, so it did not call it.

## OpenAPI definition

```yaml
openapi: 3.1.1
info:
  title: AgentSync Platform API
  version: 0.0.1
servers:
  - url: https://api.{environment}.agentsync.io/platform
    description: AgentSync API gateway
    variables:
      environment:
        default: sandbox
        enum:
          - sandbox
components:
  schemas:
    ErrorCode:
      type: string
      description: Every error code that applies across the API, as the message of the
        details entry whose param is "code". A code is never renamed or
        repurposed. parameter_invalid is a 400, a parameter is missing,
        malformed or out of range. token_invalid is a 401, the token is missing,
        malformed, expired or wrongly signed. caller_not_service_account is a
        403, the token identifies a person. caller_claims_missing is a 403, the
        token lacks a usable organization or service account claim.
        scope_missing is a 403, the token lacks the scope the operation
        requires. role_missing is a 403, the service account no longer holds a
        role at its organization that may call the operation (its grant was
        revoked or it was disabled). route_not_found is a 404, no operation
        serves the path; operations that look a record up declare their own
        <entity>_not_found codes. contract_not_found,
        contract_assignment_not_found, producer_not_found, task_not_found and
        requirement_set_not_found are each a 404 for a record that does not
        exist or that the caller's organization may not see; the two are
        answered alike. file_not_found is a 404, the task has no file you may
        download at the slot. file_scan_pending is a 409, the file's malware
        scan has not finished; try again after Retry-After seconds.
        file_unavailable is a 409, the file cannot be downloaded because its
        malware scan did not find it clean. assignments_over_cap is a 422, the
        producer holds more contract assignments that are not terminated than
        the detail serves; page through the contract assignments list instead,
        skipping those whose status is terminated. producer_roster_too_large is
        a 422, the producer holds no contract assignment that is not terminated
        under your organization's contracts and its producer roster is longer
        than the API searches. method_not_allowed is a 405, the path exists but
        not for this method. rate_limit_exceeded is a 429, requests are arriving
        too fast; a 429 from the API gateway may arrive without it.
        internal_error is a 500, the service failed in a way the caller cannot
        fix. service_unavailable is a 503, a platform service this API depends
        on could not answer. upstream_auth_unavailable is a 503, the API could
        not get its own credentials for a platform service, so it did not call
        it.
      enum:
        - parameter_invalid
        - token_invalid
        - caller_not_service_account
        - caller_claims_missing
        - scope_missing
        - role_missing
        - route_not_found
        - contract_not_found
        - contract_assignment_not_found
        - producer_not_found
        - assignments_over_cap
        - producer_roster_too_large
        - task_not_found
        - file_not_found
        - file_scan_pending
        - file_unavailable
        - requirement_set_not_found
        - method_not_allowed
        - rate_limit_exceeded
        - internal_error
        - service_unavailable
        - upstream_auth_unavailable
      example: scope_missing
```
