Skip to content
English

Save contact

POST/v1/mailboxes/{mailbox_id}/contacts

Saves the contact's name and address in the selected mailbox. If a contact with the same email already exists, updates its name without creating a duplicate.

Authentication and access · Errors and retries

Request

Terminal window
curl -X POST 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/contacts' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
--data '{"email":"[email protected]","name":"Support team"}'

Parameters

mailbox_idpathNecessarily

integer

X-Customer-IDheader
Option 1

string

Option 2

null

Request body · application/json

object

emailNecessarily

string

nameNecessarily

string

minLength: 1

maxLength: 120

Unknown fields are not accepted.

Responses

200 Successful response

application/json

object

id

integer

mailbox_id

integer

email

string

name

string

created_at

string

Date and time in UTC. If there is no offset, the value also represents UTC.

401 Login required

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

403 No access

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

404 Resource not found

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

409 State conflict

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

422 Validation error

application/json

object

detail

array

Array elements

object

locNecessarily

array

Array elements
Option 1

string

Option 2

integer

msgNecessarily

string

typeNecessarily

string

503 Temporarily unavailable

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object