AccessToken
Renew the Personal Access Token the call is made with.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/organization/access-tokens |
create |
OK |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
created, err := client.AccessToken(nil).Create(map[string]any{"expires_at": "example", "name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:AccessToken():create({ expires_at = "example", name = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->AccessToken()->create(["expires_at" => "example", "name" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.AccessToken().create({ "expires_at": "example", "name": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.AccessToken.create({ "expires_at" => "example", "name" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.AccessToken().create({ expires_at: "example", name: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
access_token |
string |
Yes | Access Token |
entities |
array |
Yes | Entities |
expires_at |
string |
Yes | Expires At |
id |
string |
Yes | Id |
name |
string |
Yes | Name |
scopes |
array |
Yes | Scopes |
create
POST /organization/access-tokens
Operation ID: postOrganizationAccessTokens.
Authentication: bearer token (bearerAuth).
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expires_at |
string |
No | |
name |
string |
No |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
access_token |
string |
Yes | |
entities |
array of object |
Yes | |
entities[].id |
string |
Yes | |
entities[].name |
string |
Yes | |
entities[].type |
string |
Yes | |
expires_at |
string (date-time) |
Yes | |
id |
string |
Yes | |
name |
string |
Yes | |
scopes |
array of string |
Yes |
201: Created
application/json
| Property | Type | Required | Description |
|---|---|---|---|
message |
string |
Yes |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cause |
string |
Yes | |
code |
integer |
Yes | |
message |
string |
Yes | |
object |
string |
Yes |