Create an attribution
POST
/api/v1/attributions
const url = 'https://example.com/api/v1/attributions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"partner_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","schema_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","workspace_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","properties":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" } }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” 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" }}Responses
Section titled “ Responses ”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
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
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
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
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}