MailcrateDocs
Organization

Provision a workspace

POST
/public/organization/workspaces

Creates a tenant workspace and, when asked, its first API key. The key's plaintext is in this response and nowhere else.

Requires the workspaces:provision scope.

Authorization

OrganizationApiKey
headerAuthorization<token>

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

Header Parameters

idempotency-key*string

Request Body

application/json
  1. body
name*string
Lengthlength <= 200
type?string
Value in"production""sandbox"
postalAddress?|null
attestContactConsent?boolean
icon?|
Match^[a-z0-9-]{1,32}$
color?|
Match^[a-z0-9-]{1,32}$
initialKeyScopes?array<>
Items1 <= items
initialKeyName?string
Lengthlength <= 100
initialKeyExpiresAt?string

Response Body

application/json
  1. response
workspace*
initialApiKey*string|null
initialApiKeyDetails*
replayed*boolean
Example Request
curl -X POST 'https://api.mailcrate.io/public/organization/workspaces' \  -H 'Authorization: Api-Key <api_key>' \  -H 'idempotency-key: string' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "workspace": {    "id": "string",    "name": "string",    "type": "production",    "sendingStatus": "active",    "sendingPausedReason": "bounce-rate",    "sendingPausedAt": "string",    "postalAddress": {},    "icon": "string",    "color": "string",    "created": "string"  },  "initialApiKey": "string",  "initialApiKeyDetails": {    "id": "string",    "name": "string",    "keyPrefix": "string",    "scopes": [      "campaign:read"    ],    "expiresAt": "string",    "lastUsedAt": "string",    "created": "string"  },  "replayed": true}