> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravan.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get or Create Contact

> Get or Create Contact.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Body

<ParamField body="org_id" type="string" required>
  The organization ID that owns the resource. Use the organization ID from your Agni account.
</ParamField>

<ParamField body="location_id" type="string">
  The connected provider location ID, usually from GoHighLevel.
</ParamField>

<ParamField body="name" type="string">
  The contact's full name in GoHighLevel.
</ParamField>

<ParamField body="email" type="string">
  The contact email address. Use a valid email format such as `alex@example.com`.
</ParamField>

<ParamField body="phone" type="string">
  The contact phone number in E.164 format. Example: `+14157774444`.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="id" type="string">
      Contact ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Contact name
    </ResponseField>

    <ResponseField name="email" type="string">
      Contact email
    </ResponseField>

    <ResponseField name="phone" type="string">
      Contact phone
    </ResponseField>

    <ResponseField name="location_id" type="string">
      GHL location ID
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml POST /api/v1/ghl/contacts
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/ghl/contacts:
    post:
      tags:
        - GHLService
      summary: Get or Create Contact
      operationId: GetOrCreateGHLContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrCreateGHLContactRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrCreateGHLContactResponse'
components:
  schemas:
    GetOrCreateGHLContactRequest:
      type: object
      required:
        - org_id
      properties:
        org_id:
          type: string
          description: Organization ID
        location_id:
          type: string
          description: GHL location ID
        name:
          type: string
          description: Contact name
        email:
          type: string
          description: Contact email
        phone:
          type: string
          description: Contact phone
    GetOrCreateGHLContactResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
            phone:
              type: string
            location_id:
              type: string
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````