---
updatedAt: 2026-09-11T05:09:48.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# Get dataset id

Fetch the Meta dataset id for a Self Serve app. If it is not stored yet, Self Serve obtains it from Meta and persists it.

## Rate limit:

10 requests per 60 seconds.

<br />

## Request Example:

```curl
curl --location '{{BASE_URL}}/partner/app/{{APP_ID}}/conversions/dataset' \
  --header 'Authorization: Bearer {{PARTNER_APP_TOKEN}}'
```

<br />

### Response

| Status Code | Response      | Comments                                |
| ----------- | ------------- | --------------------------------------- |
| **Success** |               |                                         |
| 200         | See below     | Dataset id in message                   |
| **Error**   |               |                                         |
| 400         | See below     | Invalid app / no WABA / not CAPI        |
| 401         | See below     | Missing or invalid Partner App token    |
| 403         | See below     | Caller lacks PARTNER\_APP               |
| 429         | See below     | Rate limit exceeded                     |
| 4xx / 5xx   | Upstream body | Non-success from WASS is passed through |
| 500         | See below     | Unexpected portal failure               |

#### Success — 200

```json
{
    "message": "670889492068316",
    "status": "success"
}
```

`message` is the Meta `dataset_id`.

#### Error — 400 (examples from Self Serve)

| Scenario                          | Response body                                                               |
| --------------------------------- | --------------------------------------------------------------------------- |
| Invalid app details               | `{"message": "Invalid app details", "status": "error"}`                     |
| No WABA associated                | `{"message": "No WABA Associated", "status": "error"}`                      |
| App not on CAPI                   | `{"message": "This feature is supported only for CAPI", "status": "error"}` |
| Unknown app / no API key (portal) | `{"status": "error", "message": "Invalid App Details"}`                     |

#### Error — 401

```json
{
  "status": "error",
  "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
}
```

#### Error — 429

```json
{
  "status": "error",
  "message": "Too Many Requests"
}
```

#### Error — 500

```json
{
  "status": "error",
  "message": "Unable to get conversions dataset for app id: {{APP_ID}}"
}
```

### Request parameters

| Key           | Description               | Data type | Required | Constraints                                      |
| ------------- | ------------------------- | --------- | -------- | ------------------------------------------------ |
| **Path**      |                           |           |          |                                                  |
| appId         | Partner / WhatsApp app id | String    | Required | App must belong to the authenticated partner     |
| Authorization | Partner App token         | String    | Required | `Bearer {{PARTNER_APP_TOKEN}}` with PARTNER\_APP |

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Partner Conversions API",
    "description": "Partner Portal wrappers for Meta Conversions (CAPI) APIs.\n\nThese endpoints are pass-throughs: Partner Portal proxies the request to Self Serve (WASS)\nand returns the upstream response as-is. Request and response bodies may therefore vary with\nupstream changes.\n\nSelf Serve manages `dataset_id` per app (stored in `whatsapp_details`). If it is missing before\na push, WASS calls Meta `POST /{WABA_ID}/dataset` and stores the result.\n\nAuth for both routes: Partner App JWT (`ROLE_PARTNER_APP`).\n\nJira: PP-8252\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io/partner",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Conversions",
      "description": "Meta Conversions API (CAPI) wrappers"
    }
  ],
  "paths": {
    "/app/{appId}/conversions/dataset": {
      "get": {
        "tags": [
          "Conversions"
        ],
        "summary": "Get dataset id",
        "description": "Fetch the Meta dataset id for a Self Serve app. If it is not stored yet, Self Serve obtains it from Meta and persists it.",
        "operationId": "getConversionsDataset",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AppId"
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset id in message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetResponse"
                },
                "example": {
                  "message": "670889492068316",
                  "status": "success"
                }
              }
            }
          },
          "400": {
            "description": "Invalid app / no WABA / not CAPI",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalidAppDetails": {
                    "summary": "Invalid app details",
                    "value": {
                      "message": "Invalid app details",
                      "status": "error"
                    }
                  },
                  "noWabaAssociated": {
                    "summary": "No WABA associated",
                    "value": {
                      "message": "No WABA Associated",
                      "status": "error"
                    }
                  },
                  "notCapi": {
                    "summary": "App not on CAPI",
                    "value": {
                      "message": "This feature is supported only for CAPI",
                      "status": "error"
                    }
                  },
                  "unknownApp": {
                    "summary": "Unknown app / no API key (portal)",
                    "value": {
                      "status": "error",
                      "message": "Invalid App Details"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected portal failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "Unable to get conversions dataset for app id: 1a2b3c4d-5e6f-7890-abcd-ef1234567890"
                }
              }
            }
          },
          "default": {
            "description": "Non-success from WASS is passed through as-is",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-internal": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Partner App JWT with role `ROLE_PARTNER_APP`."
      }
    },
    "parameters": {
      "AppId": {
        "name": "appId",
        "in": "path",
        "required": true,
        "description": "Partner / WhatsApp app id. The app must belong to the authenticated partner.",
        "schema": {
          "type": "string"
        },
        "example": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"
      }
    },
    "schemas": {
      "DatasetResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "message": {
            "type": "string",
            "description": "The Meta `dataset_id`.",
            "example": "670889492068316"
          },
          "status": {
            "type": "string",
            "example": "success"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "status": {
            "type": "string",
            "example": "error"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid Partner App token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Caller lacks PARTNER_APP",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Too Many Requests"
            }
          }
        }
      }
    }
  }
}
```