OnwardOnward
  • Public docs
  • Internal docs
  • Guides
  • Public API Reference
  • Internal documentation
Information
Users API
    Register a platform userpostRegister a platform userpost
Account Connection API
Events API
Rewards API
Quest chain API
Schemas
Onward Public API
Onward Public API

Users API

Connect platform and advertiser user accounts.


Register a platform user

POST
https://api.onwardinc.net
/v1/account/register
X-API-Key (header)
+X-API-Secret (header)

Publisher

Creates an Onward user for the calling platform, or returns the existing user when the platform user ID is already registered. Optionally links the user to an advertiser in the same request by providing advertiser_user_id in the body together with advertiser API key headers (x-advertiser-api-key / x-advertiser-api-secret). Both or neither of the advertiser fields must be present. Registration and advertiser linking are atomic. Direct linking emits an idempotent link_account event after quest-chain preparation. The request attempts segmentation and chain joins synchronously. A timeout still returns 200 and preserves the user and link; durable background processing finishes preparation. The continuation_status field reports the user's durable setup state: completed, pending, or failed. Advertiser key security: x-advertiser-api-key / x-advertiser-api-secret are server-side secrets — the same class as the platform key. The key must have the can_users_connect_account permission (not can_events_create). This endpoint must only be called server-to-server; never expose advertiser credentials to client-side code. See the Platform integration guide for the surrounding workflow.

Register a platform user › Request Body

Payload of POST /v1/account/register.
platform_user_id
​string · minLength: 1 · maxLength: 255 · required

Unique user identifier from your platform

Example: user_12345
​object

Links the user to the advertiser of the x-advertiser-api-key/secret headers. Platforms do not send it.

country_code
​null | string · minLength: 2 · maxLength: 2

ISO 3166-1 alpha-2 country code of the user.

Example: US
​object

Additional user attributes supplied by the platform.

Example: {"username":"player1","avatar_url":"https://platform.example/avatars/player1.png"}
advertiser_user_id
​string · minLength: 1 · maxLength: 255 · deprecated

Deprecated: use as_advertiser.advertiser_user_id. Rejected together with as_advertiser.

Example: mz_user_42

Register a platform user › Responses

Response for status 200

success
​boolean · enum · required

Indicates that the request was successful.

Enum values:
​object · required

Result of registering or finding a platform user in Onward.

Example: {"user_id":"6f2f6f4e-4a1e-4f6f-9a2b-2c9d1f0b7a31","platform_user_id":"user_12345","created_at":"2026-08-20T12:30:00.000Z","already_exists":false,"continuation_status":"completed"}
POST/v1/account/register
curl https://api.onwardinc.net/v1/account/register \ --request POST \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --header 'X-API-Secret: <api-key>' \ --data '{ "platform_user_id": "user_12345", "country_code": "US", "user_metadata": { "username": "player1", "avatar_url": "https://platform.example/avatars/player1.png" } }'
Example Request Body
{ "platform_user_id": "user_12345", "country_code": "US", "user_metadata": { "username": "player1", "avatar_url": "https://platform.example/avatars/player1.png" } }
json
Example Responses
{ "success": true, "data": { "user_id": "6f2f6f4e-4a1e-4f6f-9a2b-2c9d1f0b7a31", "platform_user_id": "user_12345", "created_at": "2026-08-20T12:30:00.000Z", "already_exists": false, "continuation_status": "completed" } }
json
application/json

deprecated

Register a platform user

POST
https://api.onwardinc.net
/v1/users/register
X-API-Key (header)
+X-API-Secret (header)

Publisher

Creates an Onward user for the calling platform, or returns the existing user when the platform user ID is already registered. Optionally links the user to an advertiser in the same request by providing advertiser_user_id in the body together with advertiser API key headers (x-advertiser-api-key / x-advertiser-api-secret). Both or neither of the advertiser fields must be present. Registration and advertiser linking are atomic. Direct linking emits an idempotent link_account event after quest-chain preparation. The request attempts segmentation and chain joins synchronously. A timeout still returns 200 and preserves the user and link; durable background processing finishes preparation. The continuation_status field reports the user's durable setup state: completed, pending, or failed. Advertiser key security: x-advertiser-api-key / x-advertiser-api-secret are server-side secrets — the same class as the platform key. The key must have the can_users_connect_account permission (not can_events_create). This endpoint must only be called server-to-server; never expose advertiser credentials to client-side code. See the Platform integration guide for the surrounding workflow.

Register a platform user › Request Body

Payload of POST /v1/account/register.
platform_user_id
​string · minLength: 1 · maxLength: 255 · required

Unique user identifier from your platform

Example: user_12345
​object

Links the user to the advertiser of the x-advertiser-api-key/secret headers. Platforms do not send it.

country_code
​null | string · minLength: 2 · maxLength: 2

ISO 3166-1 alpha-2 country code of the user.

Example: US
​object

Additional user attributes supplied by the platform.

Example: {"username":"player1","avatar_url":"https://platform.example/avatars/player1.png"}
advertiser_user_id
​string · minLength: 1 · maxLength: 255 · deprecated

Deprecated: use as_advertiser.advertiser_user_id. Rejected together with as_advertiser.

Example: mz_user_42

Register a platform user › Responses

Response for status 200

success
​boolean · enum · required

Indicates that the request was successful.

Enum values:
​object · required

Result of registering or finding a platform user in Onward.

Example: {"user_id":"6f2f6f4e-4a1e-4f6f-9a2b-2c9d1f0b7a31","platform_user_id":"user_12345","created_at":"2026-08-20T12:30:00.000Z","already_exists":false,"continuation_status":"completed"}
POST/v1/users/register
curl https://api.onwardinc.net/v1/users/register \ --request POST \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --header 'X-API-Secret: <api-key>' \ --data '{ "platform_user_id": "user_12345", "country_code": "US", "user_metadata": { "username": "player1", "avatar_url": "https://platform.example/avatars/player1.png" } }'
Example Request Body
{ "platform_user_id": "user_12345", "country_code": "US", "user_metadata": { "username": "player1", "avatar_url": "https://platform.example/avatars/player1.png" } }
json
Example Responses
{ "success": true, "data": { "user_id": "6f2f6f4e-4a1e-4f6f-9a2b-2c9d1f0b7a31", "platform_user_id": "user_12345", "created_at": "2026-08-20T12:30:00.000Z", "already_exists": false, "continuation_status": "completed" } }
json
application/json

Account Connection API