Skip to content

Link/unlink contacts on a board

PATCH
/boards/{board}/link/contacts
curl --request PATCH \
--url https://projects.work.optidata.cloud/api/boards/1/link/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "external_modelable_ids_to_add": [ 3301 ], "external_modelable_ids_to_remove": [ 3105 ] }'

Adds and removes links to Optiwork Contacts records in one atomic call.

board
required
integer

Board id.

Media typeapplication/json
object
external_modelable_ids_to_add

Optiwork Contacts record ids to link.

Array<integer>
external_modelable_ids_to_remove

Optiwork Contacts record ids to unlink.

Array<integer>
Example
{
"external_modelable_ids_to_add": [
3301
],
"external_modelable_ids_to_remove": [
3105
]
}

Counts of links changed.

Media typeapplication/json
object
added_count
integer
removed_count
integer
Example
{
"added_count": 1,
"removed_count": 1
}

Missing, invalid or expired bearer passport.

Media typeapplication/json
object
error
string
Example
{
"error": "JWT passport exception: Missing bearer token in request"
}

The authenticated user lacks the required board permission.

Media typeapplication/json
object
message
string
Example
{
"message": "This action is unauthorized."
}

Resource not found, or a nested resource does not belong to its parent in the path.

Media typeapplication/json
object
message
string
Example
{
"message": "Not found."
}

Validation failed.

Media typeapplication/json
object
message

First validation error message.

string
errors

Map of field name → list of error messages.

object
key
additional properties
Array<string>
Example
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}