Contact
The contact resource.
Basehttps://rest.carbon.ms/contact
GET
/contactList contacts
Retrieve a paginated list of contacts. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows 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
/contactRetrieve a contact
Fetch a single contact by filtering on `id`.
Query parameters
idstringMatch 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
/contactCreate a contact
Create a new contact.
Body parameters
firstNamestringlastNamestringemailstringtitlestringmobilePhonestringhomePhonestringworkPhonestringfaxstringnotesstringcompanyIdstringrequiredReferences company.id
fullNamestringisCustomerbooleanrequiredPOSThttps://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
/contactUpdate a contact
Update an existing contact, matched on `id`.
Body parameters
firstNamestringlastNamestringemailstringtitlestringmobilePhonestringhomePhonestringworkPhonestringfaxstringnotesstringcompanyIdstringrequiredReferences company.id
fullNamestringisCustomerbooleanrequiredPATCHhttps://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
/contactDelete a contact
Delete a contact, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `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