# API Management

API Management, our developer settings where you can explore what all Chatman API offers and utilize it to its full potential. In short, this is where you get public APIs for programmatically accessing Chatman.

Also, this is from where you can access the Postman collection.

To access public APIs for Chatman, tap the link as shown in the image below.

<figure><img src="/files/AgB1ZJKlELCQtLBYNfrh" alt=""><figcaption></figcaption></figure>

Chatman public collection includes numerous public APIs to access Chatman programmatically.

1. [Contacts](#contacts)
2. [Segments](#segment)
3. [Events](#events)
4. [Journey](#journey)
5. [Send Message](#send-message)

### Contacts

This includes all the contact related functions such as first\_name, last\_name, email, date of birth, gender, city, state, whatsapp\_opted etc. The different API in Contacts are:&#x20;

<details>

<summary><strong>GET - Get Contacts List</strong></summary>

This API allows you to retrieve a list of contacts from the audience table. You can specify the mode as 'all' to get all records or use 'new' and 'modified' modes to get updated contacts within a specified time range.&#x20;

Other parameters include start\_time, end\_time, limit (number of records per page), and more.

</details>

<details>

<summary><strong>GET - Get Multiple Contacts Details</strong></summary>

With this API, you can fetch details for multiple contacts at once by providing a comma-separated list of contact wa\_ids, this should be formed by combining the country code and phone number.

</details>

<details>

<summary><strong>GET - Get Contact Details</strong></summary>

This API will help obtain detailed information for an individual contact, providing specific details about a single user.

</details>

<details>

<summary><strong>POST - Add Contact</strong></summary>

When creating a new contact, this API requires mandatory information such as the phone\_number and country\_code, and  system\_attributes including first\_name and email, with other attributes being optional.

The optional information that you can provide are: external\_customer\_id (a unique ID on your platform), custom\_attributes and user\_tags.

</details>

<details>

<summary><strong>POST - Check Contact</strong></summary>

The API checks whether a given phone number is a valid WhatsApp phone number.

</details>

<details>

<summary><strong>GET - Check Contact Identity</strong></summary>

The purpose of this API is to check the WhatsApp hash associated with a contact.

</details>

<details>

<summary><strong>PATCH - Update Contact Identity</strong></summary>

This API enables the update of the WhatsApp hash for a specific contact.

</details>

<details>

<summary><strong>POST - Update Contact</strong></summary>

The API updates contacts. It requires mandatory information like **phone\_number and country\_code** and optional information like .**external\_customer\_id, system\_attributes, custom\_attributes** and **user\_tags**

</details>

### Segment

This includes all the sgement related functions. The different APIs in Segments are:&#x20;

<details>

<summary><strong>GET - Get Segments List</strong></summary>

This API allows you to retrieve a list of segments, including both live and static segments. You can use filters such as limit (specifying the number of segments to retrieve), search\_key (to filter segments based on a search term), segment\_type (to distinguish between live and static segments), and after.

</details>

<details>

<summary><strong>POST - Create Segment</strong></summary>

With this API, you can programmatically create live segments. Provide a segment\_name for your new segment and include users in the segment using one of multiple ways: user\_id (UUID, optional), wa\_id (WhatsApp ID), email, or external\_customer\_id (optional, a unique ID on your platform).&#x20;

</details>

<details>

<summary><strong>POST - Evaluate Segment</strong></summary>

This API is used to evaluate users within a segment.

</details>

<details>

<summary><strong>POST - Subscribe to a Segment</strong></summary>

Use this API to add a user to the subscribed\_users list for a segment. Provide a list of user\_ids, where user\_id is the primary key of the user in our system, referenced by Customer Id or biz\_whatsapp\_user\_id.

</details>

<details>

<summary><strong>POST - Unsubscribe from a Segment</strong></summary>

This API is designed to unsubscribe a user from a segment. It requires a list of user\_ids, where user\_id is the primary key of the user in your system, referenced by Customer Id or biz\_whatsapp\_user\_id.

</details>

### Events

It includes all the event-related APIs.&#x20;

<details>

<summary><strong>GET - Get All Events for a User</strong></summary>

You get a list of all events associated with a specific user.

</details>

It has four categories [system attribute](#system-attribute), [system event](#system-event), [custom event](#custom-events) and [campaign event](#campaign-events), each with a set of APIs.

#### System Attribute

<details>

<summary><strong>GET - Get System Attribute Types</strong></summary>

This API is utilized to retrieve values for a specific user event. It provides information related to system attribute types, allowing you to fetch and understand the details associated with user events.

</details>

<details>

<summary><strong>POST - Evaluate Chat Status</strong></summary>

With this API, you can obtain values for a particular event related to the chat status of a user.

</details>

<details>

<summary><strong>POST - Evaluate User Status</strong></summary>

This API is used to get values for a particular event associated with a user's status.

</details>

#### System Event

<details>

<summary><strong>GET - Get System Events</strong></summary>

Use this API when you want to system events specific to a user.

</details>

<details>

<summary><strong>POST - Evaluate User System Events</strong></summary>

With this API, you can evaluate information about user-specific system events.

</details>

#### Custom Events

When creating or triggering custom events, various data types are supported including: integer, string, float, Boolean, list, date, datetime, json and uuid. The APIs under custom event are:

<details>

<summary><strong>GET - Get Custom Triggered Events</strong></summary>

This API is used to get a list of custom events that have been triggered.

</details>

<details>

<summary><strong>GET - Get Specific Custom Triggered Event</strong></summary>

With this API, you can get details of a specific custom event that has been triggered.

</details>

<details>

<summary><strong>POST - Trigger Custom Event</strong></summary>

This API allows you to programmatically trigger a custom event.

</details>

Custom event also has some APIs for different event types, they are:

<details>

<summary><strong>GET - Get Custom Events</strong></summary>

This API is used to get information about triggered custom events.

</details>

<details>

<summary><strong>POST - Create Custom Event Type</strong></summary>

With this API, you can create a new custom event type within the system. To do this, you need to provide the following information in the request body:

* `event_name`: Specify the name you want to assign to your custom event.
* `attributes`: Include all the necessary parameters and data types for the custom event in the request body.

</details>

#### Campaign Events

<details>

<summary><strong>GET - Get Campaign Events by Campaign ID</strong></summary>

This API is used to get campaign events based on a specific campaign ID.

</details>

### Journey

It has all the public APIs related to the journey.

<details>

<summary><strong>GET - Get All Journey</strong></summary>

This API is utilized to retrieve information about all journeys available for a given phone number. The request supports pagination, so you can include parameters such as `limit`  and `after.`Additionally, you can use the `search_key` parameter to search among the available journeys.

</details>

<details>

<summary><strong>GET - Get All Journey Users</strong></summary>

Use this API to obtain a list of all users within a specific journey. Provide the journey ID for which you want to retrieve user information. The API endpoint would typically look like `v1/public-apis/<journey_id>/users/`.

</details>

<details>

<summary><strong>DELETE - Delete Journey</strong></summary>

This API allows you to delete a particular journey by passing its ID as a parameter. For example, the endpoint could be `v1/public-apis/delete-journey/<journey_id>`.

</details>

### Send Message

It includes all the APIs that you can utilize while sending messages.

<details>

<summary><strong>POST - Send Text Message</strong></summary>

Use this API to send a text message.

</details>

<details>

<summary><strong>POST - Send List Message</strong></summary>

This API is designed to send a list message.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.makerobos.com/chatman-enterprise-whatsapp-platform/settings/external-protocols/api-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
