> For the complete documentation index, see [llms.txt](https://docs.enable3.io/enable3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enable3.io/enable3/tech/endpoints.md).

# Endpoints

####

## Send event

> Using this endpoint you can send events for event-based missions. Requires \`X-API-KEY\` header to resolve operator identity.

```json
{"openapi":"3.0.3","info":{"title":"User Balance API","version":"1.0.0"},"servers":[{"url":"https://integration.enable3.io","description":"Production API server"}],"paths":{"/api/v1/event":{"post":{"summary":"Send event","description":"Using this endpoint you can send events for event-based missions. Requires `X-API-KEY` header to resolve operator identity.","operationId":"sendEvent","tags":["INTEGRATION"],"parameters":[{"name":"X-API-KEY","in":"header","required":true,"description":"API key assigned to user's operator","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppEventDto"}}}},"responses":{"201":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized (missing or invalid API key)"},"404":{"description":"User not found or unauthorized"}}}}},"components":{"schemas":{"AppEventDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"eventId":{"type":"string"},"eventTags":{"type":"array","items":{"type":"string"}},"value":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","userId","eventId","value","createdAt"]}}}}
```

#### Get Widget URL (use it for the [WebView integration)](https://docs.enabl3.io/enabl3/tech/integration/webview)

## Get widget url

> Get widget URL for operator's user. Creates a new user if not found.\
> The resulting URL already has the required token.\
> Optional deep-link parameters can open a supported widget section on initialization.<br>

```json
{"openapi":"3.0.3","info":{"title":"Integration API - Get Widget URL","version":"1.0"},"servers":[{"url":"https://integration.enable3.io"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key assigned to user's operator"}},"schemas":{"WidgetUrlDto":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Widget URL with embedded authentication token"}},"required":["url"]}}},"paths":{"/api/v1/integration/user/{operatorUserId}/widget":{"get":{"summary":"Get widget url","operationId":"getWidgetUrl","description":"Get widget URL for operator's user. Creates a new user if not found.\nThe resulting URL already has the required token.\nOptional deep-link parameters can open a supported widget section on initialization.\n","tags":["INTEGRATION"],"parameters":[{"name":"operatorUserId","in":"path","required":true,"description":"Operator user id, external one","schema":{"type":"string"}},{"name":"X-API-KEY","in":"header","required":true,"description":"API key assigned to user's operator","schema":{"type":"string"}},{"name":"language","in":"query","required":false,"description":"Language for widget localization. If supplied, updates the language configured for the user. Should be one of the operator's configured languages.\n","schema":{"type":"string"}},{"name":"feature","in":"query","required":false,"description":"Widget section to open on initialization. Unsupported or disabled feature values are ignored and the base widget URL is returned.\n","schema":{"type":"string","enum":["missions","rewards","referral","t2e","h2e","leaderboard"]}},{"name":"itemId","in":"query","required":false,"description":"Entity identifier within the specified widget section. Applied only for missions and rewards deep links.\n","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetUrlDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"409":{"description":"Conflict"}}}}}}
```

#### Get JWT (use it for the [SDK](https://docs.enabl3.io/enabl3/tech/integration/sdk) integration)

Using for mobile SDK (Android).

{% openapi src="/files/o1gz5rFmqx2vk3F4eY5I" path="/api/v1/integration/user/{operatorUserId}/token" method="get" %}
[integration.json](https://2323683558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8SVK0eP2IwFbT1kSzOyQ%2Fuploads%2F2xCRKsC8J3sF2vxaQ9xE%2Fintegration.json?alt=media\&token=ce903cd3-f1e3-4dac-9e2c-de31ca4e75ca)
{% endopenapi %}

#### Send revenue

Sending revenue which used for Hold to earn calculation.

{% openapi src="/files/o1gz5rFmqx2vk3F4eY5I" path="/api/v1/revenue" method="post" %}
[integration.json](https://2323683558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8SVK0eP2IwFbT1kSzOyQ%2Fuploads%2F2xCRKsC8J3sF2vxaQ9xE%2Fintegration.json?alt=media\&token=ce903cd3-f1e3-4dac-9e2c-de31ca4e75ca)
{% endopenapi %}

{% openapi src="/files/o1gz5rFmqx2vk3F4eY5I" path="/api/v1/segment/users/" method="post" %}
[integration.json](https://2323683558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8SVK0eP2IwFbT1kSzOyQ%2Fuploads%2F2xCRKsC8J3sF2vxaQ9xE%2Fintegration.json?alt=media\&token=ce903cd3-f1e3-4dac-9e2c-de31ca4e75ca)
{% endopenapi %}

{% openapi src="/files/o1gz5rFmqx2vk3F4eY5I" path="/api/v1/segment/users" method="delete" %}
[integration.json](https://2323683558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8SVK0eP2IwFbT1kSzOyQ%2Fuploads%2F2xCRKsC8J3sF2vxaQ9xE%2Fintegration.json?alt=media\&token=ce903cd3-f1e3-4dac-9e2c-de31ca4e75ca)
{% endopenapi %}

## Get current token balance by operatorUserId

> Get current token balance by \`operatorUserId\`. Requires \`X-API-KEY\` header to resolve \`operatorId\`.

```json
{"openapi":"3.0.3","info":{"title":"User Balance API","version":"1.0.0"},"servers":[{"url":"https://integration.enable3.io","description":"Production API server"}],"paths":{"/api/v1/integration/user/{operatorUserId}/balance":{"get":{"summary":"Get current token balance by operatorUserId","description":"Get current token balance by `operatorUserId`. Requires `X-API-KEY` header to resolve `operatorId`.","operationId":"getUserBalance","tags":["INTEGRATION"],"parameters":[{"name":"operatorUserId","in":"path","required":true,"description":"The user ID within the operator context","schema":{"type":"string"}},{"name":"X-API-KEY","in":"header","required":true,"description":"API key used to resolve the operatorId (injected internally)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully returned user balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBalanceIntegrationDto"}}}},"401":{"description":"Unauthorized (missing or invalid API key)"},"404":{"description":"User not found or unauthorized"}}}}},"components":{"schemas":{"UserBalanceIntegrationDto":{"type":"object","properties":{"balance":{"type":"string","format":"decimal"},"userExists":{"type":"boolean"}},"required":["balance","userExists"]}}}}
```

## Add websites for operator

> Add one or more websites to an operator's integration configuration. Requires \`X-API-KEY\` header to resolve operator identity.

```json
{"openapi":"3.0.3","info":{"title":"User Balance API","version":"1.0.0"},"servers":[{"url":"https://integration.enable3.io","description":"Production API server"}],"paths":{"/api/v1/integration/websites":{"post":{"summary":"Add websites for operator","description":"Add one or more websites to an operator's integration configuration. Requires `X-API-KEY` header to resolve operator identity.","operationId":"addWebsites","tags":["INTEGRATION"],"parameters":[{"name":"X-API-KEY","in":"header","required":true,"description":"API key assigned to user's operator","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorWebsitesDto"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized (missing or invalid API key)"},"404":{"description":"User not found or unauthorized"},"409":{"description":"Conflict (e.g. duplicate entry)"}}}}},"components":{"schemas":{"OperatorWebsitesDto":{"type":"object","properties":{"websites":{"type":"array","items":{"type":"string"}}},"required":["websites"]}}}}
```
