Skip to content

Create API key

Request

Creates a new API key. The token value is included in the response.

Security
Bearer
Bodyrequired
namestring

Human-readable label for the token, shown in the token list. May be blank.

scopesArray of strings

Scopes to grant the token. Available value: all. Defaults to all if omitted.

curl -i -X POST \
  https://api-dashboard.influencers.club/public/v1/accounts/tokens/ \
  -H 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "scopes": [
      "string"
    ]
  }'

Responses

Bodyapplication/json
idintegerrequired

Unique identifier for the API key token.

namestringrequired

Human-readable label for the token.

scopesArray of stringsrequired

Scopes granted to the token.

activebooleanrequired

Whether the token is currently active.

expires_atstring or null, (date-time)

Expiration timestamp, or null if the token never expires.

tokenstring

The API key value used as the Bearer credential. Returned in full on every read.

created_atstring, (date-time)required

When the token was created.

last_used_atstring or null, (date-time)

When the token was last used to authenticate a request, or null if never used.

Response
{ "id": 0, "name": "string", "scopes": [ "string" ], "active": true, "expires_at": "2019-08-24T14:15:22Z", "token": "string", "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z" }