API keys

Create an API key

Creates a scoped credential. The full mapleads_ key is returned once and must be stored securely. Requires the keys:write scope when called with a scoped key.

POST/v1/keys

Creates a scoped credential. The full mapleads_ key is returned once and must be stored securely. Requires the keys:write scope when called with a scoped key.

AuthorizationBearer <token>

Pass Authorization: Bearer mapleads_xxx.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name?|
Length1 <= length <= 64
expiresInDays?|
Range1 <= value <= 3650
scopes?array<>|
Items1 <= items

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/keys" \  -H "Content-Type: application/json" \  -d '{}'
{  "key": "string",  "apiKey": {    "id": "string",    "name": "string",    "prefix": "string",    "start": "string",    "enabled": true,    "scopes": [      "string"    ],    "createdAt": "2019-08-24T14:15:22Z",    "expiresAt": "2019-08-24T14:15:22Z",    "lastRequest": "2019-08-24T14:15:22Z"  }}