Contacts

API Endpoints to access Contacts

Get Contact Details

  • Endpoint: GET /contacts/{contact_id}

  • Description: Retrieves the details of a specific contact.

  • Path Parameters:

    • contact_id(integer, required): The unique identifier of the contact.

  • Response: 200 OK Returns a JSON object representing the contact details.

List Contacts

  • Endpoint: GET /contacts

  • Description: Retrieves a list of contacts with pagination.

  • Query Parameters:

    • page (integer): The page number of the results.

    • page_size (integer): The number of contacts per page.

    • search (string): String to fuzzy search all contacts by.

  • Response: 200 OK Returns a JSON array containing contact objects.

Create Contact

  • Endpoint: POST /contacts

  • Description: Creates a new contact.

  • Request Body:

    • name (string, required): The name of the contact.

    • phones (array of strings, required): The phone numbers associated with the contact.

    • emails (array of strings, required): The email addresses associated with the contact.

  • Response: 201 CREATED Returns a JSON object representing the newly created contact.

Last updated