# Carrier Contacts

### Carrier Contacts Endpoint&#x20;

Retrieve a list of **Onboarded, Dispatch,** and **FMCSA** contacts for one or more given carriers.&#x20;

### **Authentication**

* Include your **`Access-Token`** in the header of your requests.
* Include your **`x-api-key`** The API key provided by GenLogs. This header must be included in the request.
* Include **Content-Type: application/json** in the header of the request

### Permissions

The `external-api-carrier-contacts` permission is required to access this endpoint.

### **Endpoint**

* **URL:** `https://api.genlogs.io/carrier/contacts`
* **Method:** `POST`

### **Headers**

* **Access-Token**:  (string, required): Access token obtained from the "Create Access Token" endpoint.
* **x-api-key** (string, required): The API key provided by GenLogs.&#x20;

### Request Bod&#x79;**:**

* **usdot\_numbers** (string, required): usdot\_number(s) separated by commas.

### Understanding contact information

{% hint style="info" %}
There are no limitations to the number of contacts retrieved in any category (Onboarded, Dispatch, FMCSA). Each array may have zero contacts, one contact, or multiple contacts.
{% endhint %}

**Carrier Contacts returns three sets of contact information: Dispatch, FMCSA and Onboarded Contacts.**

* **Onboarded Contacts**: values provided from your Onboarded Carrier list, (managed by admins in the UI). If no values are uploaded, they will be blank.
  * `name`
  * `phone`
  * `email`
* **Dispatch contacts**: contacts validated by GenLogs, our customers, or a third party partner. Not available for all carriers:
  * `phone`
  * `email`
* **FMCSA contacts**: contacts provided by the FMCSA. These are shown exactly as registered, including possible null values, multiple semicolon separated values, or values with typos.
  * `name`
  * `phone`
  * `email`

### **Response:**

* **200 OK:** A JSON object containing 3 sets of carrier contacts.
* **400 Bad Request:** If required parameters are missing or invalid.
* **401 Unauthorized:** If the authentication credentials (Access-Token) is missing or incorrect.
* **403 Forbidden**: If the permission has not been added to your user.
* **500 Internal Server Error:** If there is an issue on the server that prevents processing the request.

### **Response Body:**

* Data (array of `CarrierContacts` objects): List of carriers contacts grouped by `usdot_number`.
  * `has_dispatch` (string): `Yes` if GenLogs team has confirmed the contact information, otherwise `No`
  * `onboarded_contact`:
    * `name`
    * `phone`
    * `email`
  * dispatch contact:
    * `phone`
    * `email`
  * fmcsa\_contact:
    * `name`
    * `phone`
    * `email`

### Request Example:

```
curl --location 'https://api.genlogs.io/carrier/contacts' \
--header 'access-token: <access-token>' \
--header 'x-api-key: <x-api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "usdot_numbers": "10553"
}'
```

## Get contacts for carriers

> Returns the contacts related to a carrier (onboarded, dispatch and FMCSA).

```json
{"openapi":"3.0.3","info":{"title":"Genlogs Carrier API","version":"1.0.0"},"paths":{"/carrier/contacts":{"post":{"summary":"Get contacts for carriers","description":"Returns the contacts related to a carrier (onboarded, dispatch and FMCSA).","responses":{"200":{"description":"Contacts found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"object","properties":{"has_dispatch":{"type":"string"},"onboarded_contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}}},"dispatch_contact":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string"}}}},"fmcsa_contact":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}}}}}}}}}},"401":{"description":"Unauthorized – missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden – invalid token or insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer","format":"int32"}},"required":["message","code"]}}}}
```


---

# 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.genlogs.io/carrier/contacts.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.
