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

# Generate eGift Links

> This endpoint allows you to generate one or more eGift links to embed in your own outreach to the recipient(s).

<Info>
  Each recipient will have a unique link generated that is associated to the email you passed in the request
</Info>

### Body

<ParamField body="send" type="object" required>
  <Expandable title="send" defaultOpen="true">
    <ParamField body="touch_id" type="integer" required>
      The ID of the campaign within Sendoso you are wanting to send.
    </ParamField>

    <ParamField body="via" type="string" initialValue="generate_egift_links" required>
      Value must be `generate_egift_links`.
    </ParamField>

    <ParamField body="via_from" type="string" required>
      The name of the application making the send request. Please make sure this is consistent per application.
    </ParamField>

    <ParamField body="recipient_users" type="array" required>
      An array of recipient emails that you are generating the links for.

      <Expandable title="send" defaultOpen="true">
        <ParamField body="email" type="string" required>
          The recipient's email.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="success" type="boolean" required>
  Whether or not the request was successful. Always `true` for 2xx responses.
</ResponseField>

<ResponseField name="message" type="string" required>
  Response message.
</ResponseField>

<ResponseField name="egift_links" type="array" required>
  The sends links to share with the recipients.

  <Expandable title="send" defaultOpen="true">
    <ResponseField name="egift_link" type="string" required>
      The link generated for this specific recipient for you to embed in your own outreach.
    </ResponseField>

    <ResponseField name="recipient_email_or_phone_number" type="string" required>
      The recipient's email or phone number associated to this link.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json Example Request theme={null}
  {
    "send": {
      "touch_id": 123456,
      "via": "generate_egift_links",
      "via_from": "Your Application Name",
      "recipient_users": [
        {
          "email": "developers@sendoso.com"
        },
        {
          "email": "developers2@sendoso.com"
        }
      ]
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "message": "Success! Here are your 2 eGift Card links:",
    "egift_links": [
      {
          "egift_link": "https://sendo.so/g/NzOHQCUf9eqw0",
          "recipient_email_or_phone_number": "developers@sendoso.com"
      },
      {
          "egift_link": "https://sendo.so/g/9d91rKc7O3d4",
          "recipient_email_or_phone_number": "developers2@sendoso.com"
      }
    ],
    "expiration_days": 30
  }
  ```

  ```json 400 - Bad Request theme={null}
  {
    "success": false,
    "message": "email can't be blank"
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "success": false,
    "message": "The access token is invalid",
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "success": false,
    "message": "Touch not found"
  }
  ```
</ResponseExample>
