Mailmus

Organization domains

GET
/projects/{projectId}/b2b/organizations/{id}/domains
AuthorizationBearer <token>

In: header

Path Parameters

id*string

organizationId

projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/b2b/organizations/string/domains"
[  {    "id": "string",    "organizationId": "string",    "projectId": "string",    "domain": "acme.com",    "status": "PENDING",    "record": "mailmus-verification=0f8c...",    "verifiedAt": "2019-08-24T14:15:22Z",    "autoJoinEnabled": true,    "lastCheckedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/projects/{projectId}/b2b/organizations/{id}/domains

Returns the TXT record to publish. The domain is only usable for single sign-on once the record has been seen.

AuthorizationBearer <token>

In: header

Path Parameters

id*string

organizationId

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/b2b/organizations/string/domains" \  -H "Content-Type: application/json" \  -d '{    "domain": "acme.com"  }'
{  "id": "string",  "organizationId": "string",  "projectId": "string",  "domain": "acme.com",  "status": "PENDING",  "record": "mailmus-verification=0f8c...",  "verifiedAt": "2019-08-24T14:15:22Z",  "autoJoinEnabled": true,  "lastCheckedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/projects/{projectId}/b2b/organizations/{id}/domains/{domainId}/verify

Looks the record up immediately, instead of waiting for the periodic check.

AuthorizationBearer <token>

In: header

Path Parameters

id*string

organizationId

domainId*string
projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/b2b/organizations/string/domains/string/verify"
{  "id": "string",  "organizationId": "string",  "projectId": "string",  "domain": "acme.com",  "status": "PENDING",  "record": "mailmus-verification=0f8c...",  "verifiedAt": "2019-08-24T14:15:22Z",  "autoJoinEnabled": true,  "lastCheckedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/projects/{projectId}/b2b/organizations/{id}/domains/{domainId}

Once on, anyone signing in with an address at this verified domain is put into this organization. The domain must be verified first. Turning it off keeps the people already in: it only stops new ones from being let in.

AuthorizationBearer <token>

In: header

Path Parameters

id*string

organizationId

domainId*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/projects/string/b2b/organizations/string/domains/string" \  -H "Content-Type: application/json" \  -d '{    "autoJoinEnabled": true  }'
{  "id": "string",  "organizationId": "string",  "projectId": "string",  "domain": "acme.com",  "status": "PENDING",  "record": "mailmus-verification=0f8c...",  "verifiedAt": "2019-08-24T14:15:22Z",  "autoJoinEnabled": true,  "lastCheckedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/projects/{projectId}/b2b/organizations/{id}/domains/{domainId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

organizationId

domainId*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/b2b/organizations/string/domains/string"
{  "removed": true}
POST
/projects/{projectId}/b2b/domain-join

Looks up the domain of the person address among the verified domains of this project, and adds them to that organization if it accepts automatic joining. Safe to call again: someone already in the organization is left as they are. Call it right after you sign someone in.

AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/projects/string/b2b/domain-join" \  -H "Content-Type: application/json" \  -d '{    "customerId": "cus_01HZY3M4K5"  }'
{  "joined": true,  "organizationId": "string",  "domain": "acme.com",  "reason": "JOINED"}