Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt

Use this file to discover all available pages before exploring further.

The WisdomAI GraphQL API always returns HTTP 200, even when a request fails. You must inspect the response body to determine whether an operation succeeded.

HTTP 200 on failure

Do not use the HTTP status code to detect errors. A failed GraphQL response returns HTTP 200 with either an errors array (for request-level failures) or a status object with a non-OK code (for mutation-level failures). Request-level error (HTTP 200)
{
  "errors": [
    {
      "message": "Unauthorized",
      "locations": [{ "line": 1, "column": 1 }]
    }
  ],
  "data": null
}
Mutation failure (HTTP 200)
{
  "data": {
    "createUsers": {
      "status": {
        "code": "ERROR",
        "message": "User with email already exists"
      }
    }
  }
}

Mutation response status

Mutations that affect users or resources return a ResponseStatus object:
type ResponseStatus {
  code: StatusCode!
  message: String!
}

enum StatusCode {
  NONE
  OK
  ERROR
  NOT_FOUND
}
Always request status { code message } in your mutation selection set:
mutation CreateUsers($input: CreateUsersInput!) {
  createUsers(input: $input) {
    status {
      code
      message
    }
  }
}
CodeMeaning
OKOperation succeeded
ERROROperation failed (see message for details)
NOT_FOUNDThe requested resource does not exist
NONENo status available

Transport-level HTTP errors

HTTP errors other than 200 indicate a transport or authentication problem, not an application failure:
HTTP statusMessageCause
401UnauthorizedInvalid or missing authentication token
400Bad RequestMalformed request payload
500Internal Server ErrorUnexpected API failure
All application-level errors and mutation failures return HTTP 200 OK. Refer to the response body for error details.

GraphQL API

Authentication and endpoint reference

ResponseStatus

Full reference for the ResponseStatus object