Skip to content

Create an attribution schema

POST
/api/v1/attribution-schemas
curl --request POST \
--url https://example.com/api/v1/attribution-schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "properties": [ { "name": "example", "type": "string", "required": true, "default": "example" } ] }'
Media type application/json
object
workspace_id
required

ID of the workspace this schema belongs to

string format: uuid
name
required

Name of the attribution schema

string
properties
required

List of property definitions for the attribution schema

Array
One of: discriminator: type
object
name
required

Name of the property

string
type
required
string
Allowed values: string
required
required

Whether this property is required on attributions

boolean
default

Default value for this property

string
nullable

Attribution schema created successfully

Media type application/json
object
id
required

ID of the newly created attribution schema

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."
}

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."
}