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 ------------ .. code-block:: text https://segmentai.salesbox.com.br/api/contacts Get Contact ---------- .. code-block:: text GET /api/contacts/{id} Get Contact's data. **HTTP Request** ``GET /api/contacts/ID`` **Response** ``Expected Response Code: 200`` .. code-block:: json { "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 ------------ .. code-block:: text GET /api/contacts Get a list of contacts. **Query Parameters** .. list-table:: :header-rows: 1 * - 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 ------------- .. code-block:: text POST /api/contacts/new Create a new contact. **Request Body** .. list-table:: :header-rows: 1 * - 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 ----------- .. code-block:: text PATCH /api/contacts/{id}/edit Edit an existing contact. **Request Body** Same fields as Create Contact. Delete Contact ------------- .. code-block:: text DELETE /api/contacts/{id}/delete Delete an existing contact.