Skip to content

Create user identity

POST
/v1/users/{id}/identities
curl --request POST \
--url https://example.com/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identities \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "identity_provider_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "external_id": "example", "external_username": "example", "external_email": "example", "external_display_name": "example" }'
id
required
string format: uuid
X-Tenant-ID
required
string format: uuid

Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.

Media type application/json
object
identity_provider_id
required
string format: uuid
external_id
required
string
external_username
string
external_email
string
external_display_name
string
Example generated
{
"identity_provider_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"external_id": "example",
"external_username": "example",
"external_email": "example",
"external_display_name": "example"
}

Created

Media type application/json
object
id
required
string format: uuid
user_id
string format: uuid
nullable
identity_provider_id
required
string format: uuid
provider_name
required
string
provider_type
required
string
external_id
required
string
external_username
string
nullable
external_email
string
nullable
external_display_name
string
nullable
linked_by
required
string
Allowed values: auto manual scim
last_synced_at
string format: date-time
nullable
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"linked_by": "auto"
}

Invalid input

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Unauthenticated

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Forbidden

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}