Skip to content

Link User

POST
/api/v3/projects/{project_id}/users/links
curl --request POST \
--url https://example.com/api/v3/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/users/links \
--header 'Content-Type: application/json' \
--data '{ "display_name": "example", "external_user_id": "example", "profile": {}, "provider_name": "app" }'

Create or resolve one durable mapping from trusted app identity to GA user.

project_id
required
Project Id
string format: uuid
X-Admin-Key
Any of:
string
Media typeapplication/json
UserLinkRequestV3
object
display_name
Any of:
string
<= 100 characters
external_user_id
required
External User Id
string
>= 1 characters <= 200 characters
profile
Profile
object
key
additional properties
any
provider_name
Provider Name
string
default: app >= 1 characters <= 50 characters

Successful Response

Media typeapplication/json
UserLinkResponseV3
object
status
required
Status
string
Allowed values: linked unlinked
user
required
UserResponseV3
object
created_at
required
Created At
string format: date-time
display_name
Any of:
string
external_provider
Any of:
string
external_user_id
Any of:
string
id
required
Id
string format: uuid
last_active_at
Any of:
string format: date-time
preferred_channel
required
Preferred Channel
string
project_id
required
Project Id
string format: uuid
status
required
Status
string
Example
{
"status": "linked"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}