---
updatedAt: 2026-07-14T10:19:31.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# GIF

This API is used to send messages with the GIF template.

# API Request

```
curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/template/msg' \
--header 'Connection: keep-alive' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'source={{SOURCE}}' \
--data-urlencode 'sandbox={{SANDBOX}}' \
--data-urlencode 'destination={{DESTINATION}}' \
--data-urlencode 'template={"id":"{{TEMPLATE_ID}}","params":{{TEMPLATE_PARAMS_LIST}}' \
--data-urlencode 'message={"type":"gif","gif":{"link":"{{GIF_URL}}"}}' \
--data-urlencode 'userId={{BSUID}}' \
--data-urlencode 'src.name={{APP_NAME}}'
```

<br />

# Response

<br />

| Status code | Response                                                                                                                                       | Comments               |
| :---------- | :--------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------- |
| 200         | `{"status": "submitted", "messageId": "db4*****-8ccc-3a438288e72f"} `                                                                          |                        |
| 429         | `{"status": "error", "message": "Too Many Requests"} `                                                                                         | 10 Requests per Minute |
| 500         | `{"status": "error", "message": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support"} ` | For any Internal Error |

<br />

# Request Parameters

**Headers**

| Key           | Description                      | Value                   | Data Type | Required/ Optional | Constraints                                |
| :------------ | :------------------------------- | :---------------------- | :-------- | :----------------- | :----------------------------------------- |
| Authorization | Access Token for the application | `{{PARTNER_APP_TOKEN}}` | String    | Required           | Should be a valid Partner App Access Token |

<br />

**Path Parameters**

| Key     | Description                      | Value        | Data Type | Required/ Optional | Constraints                                                                                                                          |
| :------ | :------------------------------- | :----------- | :-------- | :----------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| APP\_ID | Access Token for the application | `{{APP_ID}}` | String    | Required           | The Id should be a valid app Id of Gupshup. The App must be associated with the account that owns the PARTNER\_APP\_TOKEN being used |

<br />

**Form Parameters**

| Key         | Description                      | Value                                                           | Data Type | Required/ Optional | Constraints                                                                        |
| :---------- | :------------------------------- | :-------------------------------------------------------------- | :-------- | :----------------- | :--------------------------------------------------------------------------------- |
| source      | Source Phone Number              | `{{SOURCE}}`                                                    | Integer   | Required           |                                                                                    |
| sandbox     | Boolean value                    | `{{SANDBOX}}`                                                   | Boolean   | Optional           |                                                                                    |
| destination | Destination Phone Number         | `{{DESTINATION}}`                                               | Integer   | Required           |                                                                                    |
| template    | Json containing template details | `{"id":"{{TEMPLATE_ID}}","params":[{{TEMPLATE_PARAMS_LIST}}]} ` | String    | Required           | Must include valid template id                                                     |
| message     | Message Format for GIF           | `{"type":"gif","gif":{"link":"{{GIF_URL}}"}} `                  | String    | Required           | Must be a valid JSON with type as "gif" and gif object containing link to GIF file |
| src.name    | App Name                         | `{{APP_NAME}}`                                                  | String    | Required           |                                                                                    |
| userId      | BSUID                            | {{userId}}                                                      |           |                    |                                                                                    |

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Gupshup Partner API – Send Message with GIF Template",
    "description": "This API is used to send messages using a WhatsApp GIF template\nvia Gupshup Partner APIs.\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io",
      "description": "Gupshup Partner Production Server"
    }
  ],
  "paths": {
    "/partner/app/{APP_ID}/template/msg": {
      "post": {
        "summary": "GIF",
        "description": "This API is used to send messages with the GIF template.",
        "operationId": "sendGifTemplateMessage",
        "parameters": [
          {
            "name": "APP_ID",
            "in": "path",
            "required": true,
            "description": "App ID associated with the Partner account",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "source",
                  "destination",
                  "template",
                  "message",
                  "src.name"
                ],
                "properties": {
                  "source": {
                    "type": "integer",
                    "description": "Source phone number",
                    "example": 919999999999
                  },
                  "sandbox": {
                    "type": "boolean",
                    "description": "Enable sandbox mode",
                    "example": false
                  },
                  "destination": {
                    "type": "integer",
                    "description": "Destination phone number",
                    "example": 918888888888
                  },
                  "template": {
                    "type": "string",
                    "description": "JSON string containing template details",
                    "example": "{\"id\":\"template_id_123\",\"params\":[\"John\",\"Order #1234\"]}\n"
                  },
                  "message": {
                    "type": "string",
                    "description": "JSON string defining the GIF message",
                    "example": "{\"type\":\"gif\",\"gif\":{\"link\":\"https://example.com/sample.gif\"}}\n"
                  },
                  "src.name": {
                    "type": "string",
                    "description": "Application name",
                    "example": "MyAppName"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Message submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "submitted"
                    },
                    "messageId": {
                      "type": "string",
                      "example": "db4*****-8ccc-3a438288e72f"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "message": {
                      "type": "string",
                      "example": "Too Many Requests"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "message": {
                      "type": "string",
                      "example": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support\n"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PartnerAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Partner App Access Token"
      }
    }
  }
}
```