MailcrateDocs
Organization

Create a workspace API key

POST
/public/organization/workspaces/{id}/api-keys

The plaintext key is in this response and nowhere else.

Requires the workspace-keys:manage scope.

Authorization

OrganizationApiKey
headerAuthorization<token>

Api-Key mco_... — an organization management key.

Path Parameters

id*string

Request Body

application/json
  1. body
name*string
Lengthlength <= 100
scopes*array<>
Items1 <= items
expiresAt?string

Response Body

application/json
  1. response
apiKey*string
key*
Example Request
curl -X POST 'https://api.mailcrate.io/public/organization/workspaces/string/api-keys' \  -H 'Authorization: Api-Key <api_key>' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "scopes": [    "campaign:read"  ]}'
Example Response
{  "apiKey": "string",  "key": {    "id": "string",    "name": "string",    "keyPrefix": "string",    "scopes": [      "campaign:read"    ],    "expiresAt": "string",    "lastUsedAt": "string",    "created": "string"  }}