Skip to content

Create API token

POST
/api/v1/apis/token/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/apis/token/?apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"token_name": "api-automation",
"access_name": [
"read"
]
}'
apikey
required
string

API key used to authenticate the request

Example

<API_KEY>
location
required
string

Specifies the target location for the API token

Example

<LOCATION>
Media typeapplication/json
object
token_name
required

Name of the API token

string

Example

api-automation
access_name
required
One of:
Array<string>
>= 1 items <= 1 items
Allowed values: read

Successful response

Media typeapplication/json
object
code

HTTP status code of the token creation request

integer
data
object
token_name

Name of the created API token

string
access_name
Array<string>
Allowed values: READ WRITE
api_key

API token identifier

string format: uuid
auth_token

JWT authentication token associated with the API token

string
created_at

Human-readable relative timestamp indicating when the token was created

string
errors
object
message

Status message indicating the result of the request

string

Example

{
"code": 200,
"data": {
"token_name": "api-automation",
"access_name": [
"READ",
"WRITE"
],
"api_key": "uuid-string",
"auth_token": "example-jwt-string",
"created_at": "0 Day ago"
},
"message": "Success"
}