Skip to content

Create an attribution

POST
/api/v1/attributions
curl --request POST \
--url https://example.com/api/v1/attributions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "partner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "schema_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "properties": { "additionalProperty": "example" } }'
Media type application/json
object
partner_id
required

ID of the partner to associate with the attribution

string format: uuid
schema_id
required

ID of the attribution schema to validate against

string format: uuid
workspace_id
required

ID of the workspace to associate with the attribution

string format: uuid
properties
required

Key-value properties (string, number, or boolean) to attach to the attribution

object
key
additional properties
Example generated
{
"partner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"schema_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"properties": {
"additionalProperty": "example"
}
}

Attribution created successfully

Media type application/json
object
id
required

ID of the newly created attribution

string format: uuid
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Bad request

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Unauthorized

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Attribution schema or partner not found

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}

Internal server error

Media type application/json
object
error_code
required
string
Allowed values: UNAUTHORIZED NOT_FOUND INTERNAL_ERROR BAD_REQUEST FORBIDDEN CONFLICT
message
required
string
Example
{
"error_code": "UNAUTHORIZED",
"message": "Authentication credentials were not provided or are invalid."
}