Skip to main content
POST
/
api
/
v1
/
teams
/
{team_id}
/
api-keys
Mint Api Key
curl --request POST \
  --url https://api.member.dev/api/v1/teams/{team_id}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '
{
  "name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "scopes": [
    "*"
  ]
}
'
{
  "data": {
    "attributes": {
      "created_by": "<string>",
      "key_prefix": "<string>",
      "name": "<string>",
      "scopes": [
        "<string>"
      ],
      "secret": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "last_used_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "id": "<string>",
    "type": "<string>",
    "links": {
      "self": "<string>"
    },
    "meta": {},
    "relationships": {}
  },
  "included": [
    "<unknown>"
  ],
  "links": {
    "self": "<string>"
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

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

Path Parameters

team_id
string
required

Body

application/vnd.api+json
name
string
required
expires_at
string<date-time> | null
scopes
string[]

Response

Successful Response

data
JsonApiResource[ApiKeyCreateAttributes] · object
required
included
any[] | null
meta
Meta · object