---
updatedAt: 2025-02-14T21:40:45.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# Optin App User

Use this API to set Optin for the app user.

### Parameters

| Parameters    | Value                     | Description                             |
| :------------ | :------------------------ | :-------------------------------------- |
| Authorization | \{\{PARTNER\_APP\_TOKEN}} | Access Token for the application        |
| APP ID        | \{\{APP\_ID}}             | Unique Identifier for Gupshup App       |
| phone         | 91xxxxxxxxxx              | Phone number of user to get status for. |

### Sample Request

```curl
curl --location --request PUT 'https://partner.gupshup.io/partner/app/{{APP_ID}}/optin' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'phone={{PHONE_NUMBER}}'
```

### Sample Response

```json
  Status code will be - 202  (Accepted)
    Response will be empty as it is async process
```

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Partner Portal Public APIs",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io"
    }
  ],
  "tags": [
    {
      "name": "App"
    }
  ],
  "paths": {
    "/partner/app/{appId}/optin": {
      "put": {
        "tags": [
          "App"
        ],
        "summary": "App | Optin App User",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {
                  "phone": {
                    "type": "integer",
                    "example": "918286836492"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "{{PARTNER_APP_TOKEN}}"
          },
          {
            "name": "appId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "example": "9e97650d-add3-4557-9535-4cdf47c3fa68"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {}
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```