Skip to main content

Create a customer contact

POST/api/v1/customers/{customer_id}/contacts

  • Needs an API key, and runs with the access of the member who made the key.
  • Send an Idempotency-Key. The same key with the same request within 24 hours gives the first answer again and changes nothing.
  • A connected AI assistant can use it too, as createCustomerContact.

Parameters

In the address

  • customer_idstring (uuid)required

Headers

  • Idempotency-Keystringrequired

    Unique user-scoped key for safely retrying this mutation for 24 hours.

    At least 1 character. Up to 200 characters.

Request body

Sent as application/json.

  • contactobjectrequired

    Fields(6)
    • lock_versioninteger

      At least 0.

    • namestringrequired

    • job_titlestring or null

    • emailstring (email) or null

    • phonestring or null

    • notesstring or null

Responses

201Contact details.

  • dataobjectrequired

    Fields(12)
    • lock_versioninteger

      At least 0.

    • created_atstring (date-time)required

    • updated_atstring (date-time)required

    • idstring (uuid)required

    • account_idstring (uuid)required

    • customer_idstring (uuid)required

    • namestringrequired

    • job_titlestring or null

    • emailstring (email) or null

    • phonestring or null

    • notesstring or null

    • archived_atstring (date-time) or null

A refusal answers in the one error shape every operation shares.

Example

A request our own tests send. The ids are made up: put your own in their place.

curl -X POST "https://app.tradesender.co.uk/api/v1/customers/372a8e62-6d44-552f-9c0e-c1229b6478be/contacts" \
  -H "Authorization: Bearer $TRADESENDER_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "contact": {
    "name": "Alex Taylor",
    "job_title": "Property owner",
    "email": "alex@example.test",
    "phone": "+44 7700 900456",
    "notes": "Primary person for access questions."
  }
}'