API Docs
Tokens

/tokens


POST
  • Operation ID: tokens-create
  • Summary: Create token
  • Description: Create an API token for use in Moonbase

Parameters

NameInRequiredTypeDescription

Responses

200:

  • Description: Successful response
Content

application/json:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^c[^\\s-]{8,}$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "expiresAt": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ],
      "nullable": true
    },
    "lastUsedAt": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ],
      "nullable": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "deletedAt": {
      "anyOf": [
        {
          "not": {}
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ],
      "nullable": true
    },
    "token": {
      "type": "string"
    },
    "user": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        }
      },
      "required": [
        "email"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "name",
    "createdAt",
    "token",
    "user"
  ],
  "additionalProperties": false
}

default:

  • Description: