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

# Grant offer to contact

> ## Grant offer(s) to a contact
Create an offer grant for a contact which results in creating a new customer record for your contact.

In the request body inlcude offer resource identifier(s), `id: OFFER_ID`, `type: "offers"`.

To skip sending a welcome email to the customer include a `meta` object in the request body.

```
{ "data": [{"type": "offers", "id": "123"}], "meta": {"send_customer_welcome_email": false}}
```

The `meta` attribute `send_customer_welcome_email` as `false` will prevent sending the welcome email.

(The default behavior is to send the welcome email.)

## Response
* A successful response body will list the offers related to the contact
* An error response will include a JSON body with error details.

## Behaviors and side effects
* Checks if the contact was already granted the offer
* Checks for existing customerby email
  * If no existing customer, generates a new customer record with contact details
* May send a welcome email to the customer
* May send a gift granted email if this is a gift offer
* Triggers automations if configured





## OpenAPI

````yaml /openapi.yaml post /v1/contacts/{contact_id}/relationships/offers
openapi: 3.1.1
info:
  title: Kajabi API V1
  version: 1.0.1
  description: >
    ## Public API

    * Server URL `https://api.kajabi.com`

    * Endpoint paths are prefixed with `/v1`

    * Version endpoint `GET https://api.kajabi.com/v1/version`

    * See the [Developers Site](https://developers.kajabi.com) for documentation
    and examples.

    * Try the demo [Postman
    collection](https://www.postman.com/kajabi-apis/beta-public-api-demo/collection/fg4iyaz/kajabi-public-api-v1)

    ## API Keys

    * Your API `client_id` and `client_secret` are available on the [User API
    Keys](https://app.kajabi.com/admin/settings/security) section of the Kajabi
    Admin Portal.
      * Custom API Keys can be created with specific permissions.
      * Click the "Create User API Key" button, enter a name (e.g. "My project"), select the user and permissions, and click "Create".
      * For security purposes, you may "Delete" or "Rotate" the api credentials at any time; which will invalidate any access tokens granted with the credentials.
    ## Video Walkthroughs

    *
    [Capabilities](https://drive.google.com/file/d/1Puc9B2sSdA-RQb7YMxmUXg4FVoEXytoc/view?usp=sharing)

    * [Getting
    Started](https://drive.google.com/file/d/1hbGRShkxven_QMWvgYrerHKURbcZrnvJ/view?usp=sharing)

    * [Error
    Examples](https://drive.google.com/file/d/1i0wQK71I1jpaZVsxYwsn62gVj40S_E7Y/view?usp=sharing)

    * [External Contact
    Form](https://drive.google.com/file/d/1HqpULXvan5TOK3LvM7nILCuCkCaX0kFT/view?usp=sharing)
  contact:
    email: support@kajabi.com
    name: Support
    url: >-
      https://help.kajabi.com/hc/en-us/articles/4404549690523-How-to-Get-Help-From-Kajabi-Live-Agents
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.kajabi.com
    description: Production
security: []
paths:
  /v1/contacts/{contact_id}/relationships/offers:
    post:
      tags:
        - Contacts
      summary: Grant offer to contact
      description: >+
        ## Grant offer(s) to a contact

        Create an offer grant for a contact which results in creating a new
        customer record for your contact.


        In the request body inlcude offer resource identifier(s), `id:
        OFFER_ID`, `type: "offers"`.


        To skip sending a welcome email to the customer include a `meta` object
        in the request body.


        ```

        { "data": [{"type": "offers", "id": "123"}], "meta":
        {"send_customer_welcome_email": false}}

        ```


        The `meta` attribute `send_customer_welcome_email` as `false` will
        prevent sending the welcome email.


        (The default behavior is to send the welcome email.)


        ## Response

        * A successful response body will list the offers related to the contact

        * An error response will include a JSON body with error details.


        ## Behaviors and side effects

        * Checks if the contact was already granted the offer

        * Checks for existing customerby email
          * If no existing customer, generates a new customer record with contact details
        * May send a welcome email to the customer

        * May send a gift granted email if this is a gift offer

        * Triggers automations if configured

      parameters:
        - name: contact_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/resource_identifier'
                meta:
                  type: object
                  properties:
                    send_customer_welcome_email:
                      type: boolean
              required:
                - data
      responses:
        '200':
          description: Success, adds tag relationship to contact resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/contacts_relationships_tags_response'
        '400':
          description: Bad Request, invalid request body
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_bad_request'
        '401':
          description: Unauthorized, Authorization header is missing or invalid
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_unauthorized'
        '403':
          description: Forbidden, insufficient permission to access the resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
        '404':
          description: Not found, the resource is unknown
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
      security:
        - Bearer: []
components:
  schemas:
    resource_identifier:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
      required:
        - id
        - type
    contacts_relationships_tags_response:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/resource_identifiers'
        links:
          type: object
          properties:
            self:
              type: string
    errors_bad_request:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_unauthorized:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_forbidden:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    resource_identifiers:
      type: array
      items:
        $ref: '#/components/schemas/resource_identifier'
    errors_attributes:
      type: object
      properties:
        status:
          type: string
        source:
          type: object
          nullable: true
          properties:
            pointer:
              type: string
        title:
          type: string
        detail:
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````