Skip to content

Add a customer contact

POST
/customers/{id}/contacts
curl --request POST \
--url https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/contacts \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "name": "example", "email": "hello@example.com", "phone": "07700 900123", "kind": "normal", "relationship": "example" }'
id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
name
required
string
>= 1 characters <= 120 characters
email
required
string format: email
<= 254 characters
phone
string | null
/^\+?[\d\s()-]{7,20}$/

Example

07700 900123
kind
required
string
Allowed values: normal billing both
relationship
string | null
<= 60 characters

Added

Media typeapplication/json
object
id
required

UUID v7

string format: uuid
name
required
string
email
required
string format: email
phone
required
string | null
/^\+?[\d\s()-]{7,20}$/
kind
required
string
Allowed values: normal billing both
relationship
required
string | null
<= 60 characters

Example

{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"phone": "07700 900123",
"kind": "normal",
"relationship": "Accounts"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a member of that tenant

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not found

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}