Contact

The contact resource.

Basehttps://rest.carbon.ms/contact
GET/contact

List contacts

Retrieve a paginated list of contacts. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/contact
curl --request GET \
  --url 'https://rest.carbon.ms/contact?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "isCustomer": true,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "title": "string",
    "mobilePhone": "string"
  }
]
GET/contact

Retrieve a contact

Fetch a single contact by filtering on `id`.

Query parameters

idstring

Match on the contact's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/contact
curl --request GET \
  --url 'https://rest.carbon.ms/contact?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "isCustomer": true,
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "title": "string",
  "mobilePhone": "string"
}
POST/contact

Create a contact

Create a new contact.

Body parameters

firstNamestring
lastNamestring
emailstring
titlestring
mobilePhonestring
homePhonestring
workPhonestring
faxstring
notesstring
companyIdstringrequired

References company.id

fullNamestring
isCustomerbooleanrequired
POSThttps://rest.carbon.ms/contact
curl --request POST \
  --url https://rest.carbon.ms/contact \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789","isCustomer":true}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "isCustomer": true,
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "title": "string",
  "mobilePhone": "string"
}
PATCH/contact

Update a contact

Update an existing contact, matched on `id`.

Body parameters

firstNamestring
lastNamestring
emailstring
titlestring
mobilePhonestring
homePhonestring
workPhonestring
faxstring
notesstring
companyIdstringrequired

References company.id

fullNamestring
isCustomerbooleanrequired
PATCHhttps://rest.carbon.ms/contact
curl --request PATCH \
  --url 'https://rest.carbon.ms/contact?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"firstName":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "isCustomer": true,
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "title": "string",
  "mobilePhone": "string"
}
DELETE/contact

Delete a contact

Delete a contact, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the contact to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/contact
curl --request DELETE \
  --url 'https://rest.carbon.ms/contact?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content