Docs API keys /api/token/
API reference

Update token

Update an existing token. Body must include id. If query status_only is set, only status is updated.

PUT/api/token/

Body Parametersapplication/json

body
allOf
TokenCreate object
properties
allow_ips string

IP allowlist

expired_time integer

Expiry unix seconds; `-1` never expires

group string

User group

mj_custom_proxy string

Midjourney custom proxy

mj_image_mode string

Midjourney image mode

model_limits string

Model limit configuration

model_limits_enabled boolean

Whether model limits are enabled

name* string

Name

remain_quota integer

Remaining quota

routing_priority string

Routing priority

unlimited_quota boolean

Whether quota is unlimited

object object
properties
id* integer

Resource or task ID

status integer

Status

Responses

200 Success; data is the updated token object application/json
response-200
allOf
ApiEnvelope object
properties
data

Data payload (often Base64 or a structured object)

message string

Message

success boolean

Whether the call succeeded

object object
properties
data object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"allow_ips": "",
3"expired_time": -1,
4"group": "",
5"id": 1,
6"model_limits": "",
7"model_limits_enabled": false,
8"name": "my-token",
9"remain_quota": 500000,
10"unlimited_quota": false
11}
Code Sample cURL
1curl -X PUT "https://api.digislash.com/api/token/" \
2-H "Content-Type: application/json" \
3-d '{
4"allow_ips": "",
5"expired_time": -1,
6"group": "",
7"id": 1,
8"model_limits": "",
9"model_limits_enabled": false,
10"name": "my-token",
11"remain_quota": 500000,
12"unlimited_quota": false
13}'
Response
1▼{
2▼"data": {
3"accessed_time": 0,
4"allow_ips": "string",
5"created_time": 0,
6"expired_time": 0,
7"group": "string",
8"id": 0,
9"key": "string",
10"mj_custom_proxy": "string",
11"mj_image_mode": "string",
12"model_limits": "string",
13"model_limits_enabled": true,
14"name": "string",
15"remain_quota": 0,
16"routing_priority": "string",
17"status": 0,
18"total": 0,
19"unlimited_quota": true,
20"used_quota": 0,
21"user_id": 0
22},
23"message": "string",
24"success": true
25}