Skip to main content
PATCH
/
user
/
custom_token
/
{name}
Update Token
curl --request PATCH \
  --url https://api.edenai.run/v2/user/custom_token/{name}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "balance": 0,
  "expire_time": "2023-11-07T05:31:56Z",
  "active_balance": true
}
'
{
  "name": "<string>",
  "token_type": "sandbox_api_token",
  "balance": 0,
  "expire_time": "2023-11-07T05:31:56Z",
  "active_balance": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

name
string
required

Body

application/json
balance
number<double>

Optional remaining credits balance for this Token, if active_balance is set to True and the balance reaches 0, this token will become unusable

Required range: -100000 < x < 100000
expire_time
string<date-time> | null
active_balance
boolean

Weither to use the balance field or not.

Response

200 - application/json
name
string
required

The token name

token_type
enum<string>
required
  • sandbox_api_token - Sandbox
  • api_token - Back
Available options:
sandbox_api_token,
api_token
balance
number<double>

Optional remaining credits balance for this Token, if active_balance is set to True and the balance reaches 0, this token will become unusable

Required range: -100000 < x < 100000
expire_time
string<date-time> | null
active_balance
boolean

Weither to use the balance field or not.