Users API
Connect platform and advertiser user accounts.
Register a platform user
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
platform_user_idUnique user identifier from your platform
Links the user to the advertiser of the x-advertiser-api-key/secret headers. Platforms do not send it.
country_codeISO 3166-1 alpha-2 country code of the user.
Additional user attributes supplied by the platform.
advertiser_user_idDeprecated: use as_advertiser.advertiser_user_id. Rejected together with as_advertiser.
Register a platform user › Responses
Response for status 200
successIndicates that the request was successful.
Result of registering or finding a platform user in Onward.
Register a platform user
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
platform_user_idUnique user identifier from your platform
Links the user to the advertiser of the x-advertiser-api-key/secret headers. Platforms do not send it.
country_codeISO 3166-1 alpha-2 country code of the user.
Additional user attributes supplied by the platform.
advertiser_user_idDeprecated: use as_advertiser.advertiser_user_id. Rejected together with as_advertiser.
Register a platform user › Responses
Response for status 200
successIndicates that the request was successful.
Result of registering or finding a platform user in Onward.