---
updatedAt: 2026-05-27T02:53:47.000Z
agentTools:
  projectIndex: https://docs.exchange.coinjar.com/llms.txt
---

# Create a new API token

Generates a permanent API token with raw token

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Trading REST API",
    "description": "CoinJar Exchange Trading API",
    "version": "1.0.0"
  },
  "paths": {
    "/tokens": {
      "post": {
        "summary": "Create a new API token",
        "tags": [
          "Token"
        ],
        "description": "Generates a permanent API token with raw token",
        "security": [
          {
            "bearer_auth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Returns an API tokens",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/token",
                  "example": {
                    "uuid": "168e0f46-1861-471e-a4b7-d25eee52d6fc",
                    "name": "My API Token",
                    "raw_token": null,
                    "revoked_at": null,
                    "created_at": "2020-07-13T02:37:43.000Z",
                    "scope": "allaccess",
                    "scopes": [
                      "read",
                      "auth",
                      "user_profile",
                      "trade",
                      "transfer"
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Invalid token"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "allaccess",
                      "trades",
                      "readonly"
                    ]
                  }
                },
                "required": [
                  "name",
                  "scope"
                ]
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.exchange.coinjar.com/"
    },
    {
      "url": "https://api.exchange.coinjar-sandbox.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "token": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "identified": {
            "type": "boolean"
          },
          "raw_token": {
            "type": "string",
            "nullable": true
          },
          "revoked_at": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "nullable": true
          },
          "sudo_expiry": {
            "type": "integer",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "enum": [
              "allaccess",
              "trades",
              "readonly"
            ],
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "auth",
                "user_profile",
                "trade",
                "transfer",
                "external_withdrawal"
              ]
            }
          }
        }
      }
    }
  }
}
```