Mailmus

Customers

GET
/projects/{projectId}/customers
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Query Parameters

q*string
status*string
provider*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/customers?q=string&status=string&provider=string"
{  "data": [    {      "id": "string",      "projectId": "string",      "email": "string",      "emailVerifiedAt": "2019-08-24T14:15:22Z",      "phone": "string",      "phoneVerifiedAt": "2019-08-24T14:15:22Z",      "metadata": {},      "roles": [        "string"      ],      "lastSignInAt": "2019-08-24T14:15:22Z",      "bannedAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "mfaEnabledAt": "2019-08-24T14:15:22Z",      "failedSignInAttempts": 0,      "signInLockedUntil": "2019-08-24T14:15:22Z",      "identities": [        {          "provider": "PASSWORD",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "sessions": [        {          "id": "string",          "userAgent": "string",          "ipAddress": "string",          "createdAt": "2019-08-24T14:15:22Z",          "expiresAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "total": 0,  "page": 0,  "pages": 0}
GET
/projects/{projectId}/customers/stats
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/customers/stats"
{  "total": 0,  "verified": 0,  "banned": 0,  "mfaEnabled": 0}
GET
/projects/{projectId}/customers/export
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Response Body

text/csv

curl -X GET "https://example.com/projects/string/customers/export"
"string"
GET
/projects/{projectId}/customers/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/customers/string"
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
DELETE
/projects/{projectId}/customers/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/customers/string"
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
GET
/projects/{projectId}/customers/{id}/timeline
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

curl -X GET "https://example.com/projects/string/customers/string/timeline"
Empty
GET
/projects/{projectId}/customers/{id}/events
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Query Parameters

limit?number
cursor?string

The nextCursor of the previous page.

Response Body

application/json

curl -X GET "https://example.com/projects/string/customers/string/events"
{  "data": [    {      "id": "string",      "type": "customer.signed_in",      "actorType": "DEVELOPER",      "actorId": "string",      "actorLabel": "string",      "subjectCustomerId": "string",      "metadata": {},      "occurredAt": "2019-08-24T14:15:22Z",      "erasedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
GET
/projects/{projectId}/customers/{id}/audit-log
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/customers/string/audit-log"
{  "data": [    {      "id": "string",      "actorEmail": "string",      "action": "api_key.created",      "targetType": "ApiKey",      "targetId": "string",      "metadata": {},      "impersonatedByStaffEmail": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "total": 0,  "page": 0,  "pages": 0}
POST
/projects/{projectId}/customers/{id}/ban
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/customers/string/ban"
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
POST
/projects/{projectId}/customers/{id}/unban
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/customers/string/unban"
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
POST
/projects/{projectId}/customers/{id}/sessions/{sessionId}/revoke
AuthorizationBearer <token>

In: header

Path Parameters

id*string
sessionId*string
projectId*string

Response Body

curl -X POST "https://example.com/projects/string/customers/string/sessions/string/revoke"
Empty
POST
/projects/{projectId}/customers/{id}/sessions/revoke-all
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

curl -X POST "https://example.com/projects/string/customers/string/sessions/revoke-all"
Empty
POST
/projects/{projectId}/customers/{id}/mfa/reset
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

curl -X POST "https://example.com/projects/string/customers/string/mfa/reset"
Empty
PATCH
/projects/{projectId}/customers/{id}/metadata
AuthorizationBearer <token>

In: header

Path Parameters

id*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/customers/string/metadata" \  -H "Content-Type: application/json" \  -d '{    "metadata": {      "plan": "pro",      "internalCustomerId": "cus_123"    }  }'
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
PATCH
/projects/{projectId}/customers/{id}/roles
AuthorizationBearer <token>

In: header

Path Parameters

id*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/customers/string/roles" \  -H "Content-Type: application/json" \  -d '{    "roles": [      "pro",      "beta-tester"    ]  }'
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
PUT
/projects/{projectId}/customers/{id}/roles
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/projects/string/customers/string/roles" \  -H "Content-Type: application/json" \  -d '{    "roles": [      "pro",      "beta-tester"    ]  }'
{  "id": "string",  "projectId": "string",  "email": "string",  "emailVerifiedAt": "2019-08-24T14:15:22Z",  "phone": "string",  "phoneVerifiedAt": "2019-08-24T14:15:22Z",  "metadata": {},  "roles": [    "string"  ],  "lastSignInAt": "2019-08-24T14:15:22Z",  "bannedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "mfaEnabledAt": "2019-08-24T14:15:22Z",  "failedSignInAttempts": 0,  "signInLockedUntil": "2019-08-24T14:15:22Z",  "identities": [    {      "provider": "PASSWORD",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "sessions": [    {      "id": "string",      "userAgent": "string",      "ipAddress": "string",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ]}
POST
/projects/{projectId}/customers/link
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/customers/link" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string",    "externalUserId": "user_8291"  }'
{  "customer": {    "id": "string",    "projectId": "string",    "email": "string",    "emailVerifiedAt": "2019-08-24T14:15:22Z",    "phone": "string",    "phoneVerifiedAt": "2019-08-24T14:15:22Z",    "metadata": {},    "roles": [      "string"    ],    "lastSignInAt": "2019-08-24T14:15:22Z",    "bannedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "mfaEnabledAt": "2019-08-24T14:15:22Z",    "failedSignInAttempts": 0,    "signInLockedUntil": "2019-08-24T14:15:22Z",    "identities": [      {        "provider": "PASSWORD",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "sessions": [      {        "id": "string",        "userAgent": "string",        "ipAddress": "string",        "createdAt": "2019-08-24T14:15:22Z",        "expiresAt": "2019-08-24T14:15:22Z"      }    ]  },  "mergedCustomerId": "string"}