Authentication

Create API tokens, configure permissions, and authenticate requests.

Every request requires a Bearer token in the Authorization header. You create tokens from your YourGPT dashboard — each token is scoped to an organization and can be restricted to specific projects and permissions.

Creating a token

  1. Open your YourGPT Dashboard
  2. Go to Settings > API Tokens
  3. Click Create Token
Create API Token dialog
  1. Configure the token:
SettingDescription
NameA label to identify this token (e.g., "Production", "CI/CD")
Access RoleBroad role-based access across both project and organization-level endpoints
Project scopeAll projects, or restrict to specific ones
Fine-grained permissionsOptional — restrict project-level access to specific modules and actions
Expiration7, 30, 60, 90 days, custom, or no expiration

You must configure at least one of: an access role or fine-grained permissions.

Copy your token immediately after creation. It is only shown once and cannot be retrieved later.

Copy your API token

Using your token

Include it in the Authorization header on every request:

curl -X POST https://api.yourgpt.ai/chatbot/v1/getMyProjects \
  -H "Authorization: Bearer api-v1-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{}'

All tokens use the api-v1- prefix:

api-v1-a1b2c3d4e5f6789...

Access control

Tokens support two permission models. You can use one or both.

Access roles

Assign a role for broad access across your organization and projects:

RoleProject accessOrganization access
OwnerFull access to all modulesFull access to all org operations
EditorEditor-level access to project APIsLimited org access
ViewerRead-only across all modulesRead-only on org details

Owner tokens have unrestricted access. A compromised owner token puts your entire organization at risk. For project-level tasks, prefer fine-grained permissions scoped to specific projects and modules — only use access roles when you need cross-project or org-level access.

Fine-grained permissions

Control access at the module level — choose which features a token can read or write:

Fine-grained permissions
ComponentDescription
ModuleA specific feature area your token can access
ActionThe level of access — Read or Write

A token without the required permission gets a 403 error.

When both an access role and fine-grained permissions are set, the access role handles organization-level APIs while fine-grained permissions control project-level access.

Project scope

ScopeBehavior
All projectsAccess every current and future project
Selected projectsRestricted to specific projects chosen at creation

Requests to a project outside the token's scope return 403.

The token creator must be a member of each project they want to access via the API. If you get a "You are not a member of this Project" error, join the project from your dashboard first.

A token's effective access depends on both its configured permissions and the creator's current role in the organization and project. If the creator's role is changed or revoked, the token's access is automatically restricted accordingly.

Managing tokens

API Tokens list
ActionWhat it does
DeactivateTemporarily disable the token. Reactivate any time.
RegenerateIssue a new token value with the same config. Old value stops working immediately.
RevokePermanently delete the token. Cannot be undone.

Tokens also stop working if the user who created them is removed from the organization.

Rate limits

1,000 requests per hour per token. Exceeding this returns a 429 response:

{
  "type": "RXERROR",
  "message": "Rate limit exceeded. Please try again later."
}

Error codes

StatusMeaning
401Token is invalid, expired, deactivated, or the creator was removed
403Token lacks the required permission, role, or project scope
429Rate limit exceeded

MCP Integration

You can also use your API token to connect YourGPT with AI assistants like Claude Desktop via MCP (Model Context Protocol). Go to Settings > API Tokens and click MCP Setup to get the configuration.

MCP setup configuration

Looking for Project Integration API authentication? See Project Integration Authentication.

On this page