Share feedback
Answers are generated based on the documentation.

Schema

createAccessTokenRequest

Type: object

expires_at

Type: string

Optional expiration date for the token. If omitted, the token will remain valid indefinitely.
All schema constraints and annotations
{
  "description": "Optional expiration date for the token.\nIf omitted, the token will remain valid indefinitely.\n",
  "example": "2021-10-28T18:30:19.520861Z",
  "format": "date-time",
  "type": "string"
}
scopes · required

Type: array

Valid scopes: "repo:admin", "repo:write", "repo:read", "repo:public_read"
Array item

Type: string

All schema constraints and annotations
{
  "type": "string"
}
All schema constraints and annotations
{
  "description": "Valid scopes: \"repo:admin\", \"repo:write\", \"repo:read\", \"repo:public_read\"\n",
  "example": [
    "repo:read"
  ],
  "items": {
    "type": "string"
  },
  "type": "array"
}
token_label · required

Type: string

Friendly name for you to identify the token.
All schema constraints and annotations
{
  "description": "Friendly name for you to identify the token.",
  "example": "My read only token",
  "maxLength": 100,
  "minLength": 1,
  "type": "string"
}
All schema constraints and annotations
{
  "examples": [
    {
      "scopes": [
        "repo:read"
      ],
      "token_label": "My read only token"
    }
  ],
  "properties": {
    "expires_at": {
      "description": "Optional expiration date for the token.\nIf omitted, the token will remain valid indefinitely.\n",
      "example": "2021-10-28T18:30:19.520861Z",
      "format": "date-time",
      "type": "string"
    },
    "scopes": {
      "description": "Valid scopes: \"repo:admin\", \"repo:write\", \"repo:read\", \"repo:public_read\"\n",
      "example": [
        "repo:read"
      ],
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "token_label": {
      "description": "Friendly name for you to identify the token.",
      "example": "My read only token",
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "token_label",
    "scopes"
  ],
  "type": "object"
}