Mailmus

Contacts

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

In: header

Path Parameters

projectId*string

Query Parameters

status*string
q*string
attrKey*string
attrValue*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/contacts?status=string&q=string&attrKey=string&attrValue=string"
{  "data": [    {      "id": "string",      "email": "contact@exemple.com",      "attributes": {},      "unsubscribed": true,      "appId": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "total": 0,  "page": 0,  "pages": 0}
POST
/projects/{projectId}/contacts
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/contacts" \  -H "Content-Type: application/json" \  -d '{    "email": "contact@example.com"  }'
{  "id": "string",  "email": "contact@exemple.com",  "attributes": {},  "unsubscribed": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/projects/{projectId}/contacts/export
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Response Body

text/csv

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

In: header

Path Parameters

projectId*string

Response Body

application/json

curl -X POST "https://example.com/projects/string/contacts/import"
{  "imported": 0,  "skipped": 0}
POST
/projects/{projectId}/contacts/batch
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/contacts/batch" \  -H "Content-Type: application/json" \  -d '{}'
{  "imported": 0,  "skipped": 0}
GET
/projects/{projectId}/contacts/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X GET "https://example.com/projects/string/contacts/string"
{  "id": "string",  "email": "contact@exemple.com",  "attributes": {},  "unsubscribed": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/projects/{projectId}/contacts/{id}
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/contacts/string" \  -H "Content-Type: application/json" \  -d '{    "attributes": {      "firstName": "Jane",      "plan": "pro"    }  }'
{  "id": "string",  "email": "contact@exemple.com",  "attributes": {},  "unsubscribed": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/projects/{projectId}/contacts/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X DELETE "https://example.com/projects/string/contacts/string"
{  "deleted": true}
PATCH
/projects/{projectId}/contacts/{id}/unsubscribe
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X PATCH "https://example.com/projects/string/contacts/string/unsubscribe"
{  "id": "string",  "email": "contact@exemple.com",  "attributes": {},  "unsubscribed": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/projects/{projectId}/contacts/{id}/resubscribe
AuthorizationBearer <token>

In: header

Path Parameters

id*string
projectId*string

Response Body

application/json

curl -X PATCH "https://example.com/projects/string/contacts/string/resubscribe"
{  "id": "string",  "email": "contact@exemple.com",  "attributes": {},  "unsubscribed": true,  "appId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}