Contacts

Use this endpoint to manipulate and obtain details on Salesbox’s Contacts.

Using the API

You can interact with this API through the HTTP endpoints as described in this document.

Base Endpoint

https://segmentai.salesbox.com.br/api/contacts

Get Contact

GET /api/contacts/{id}

Get Contact’s data.

HTTP Request

GET /api/contacts/ID

Response

Expected Response Code: 200

{
    "contact": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "phone": "+1234567890",
        "company": "Example Corp",
        "title": "CEO",
        "createdAt": "2024-01-15T10:00:00+00:00",
        "modifiedAt": "2024-01-15T10:00:00+00:00"
    }
}

List Contacts

GET /api/contacts

Get a list of contacts.

Query Parameters

Name

Type

Description

search

string

Text to search contacts by

page

int

Which page to display

limit

int

How many records to return

orderBy

string

Column to sort by

orderByDir

string

Sort direction: asc or desc

Create Contact

POST /api/contacts/new

Create a new contact.

Request Body

Name

Type

Description

name

string

Contact’s full name

email

string

Contact’s email address

phone

string

Contact’s phone number

company

string

Contact’s company name

title

string

Contact’s job title

Edit Contact

PATCH /api/contacts/{id}/edit

Edit an existing contact.

Request Body

Same fields as Create Contact.

Delete Contact

DELETE /api/contacts/{id}/delete

Delete an existing contact.