Skip to content
Suomi

Add another organisation's integration to the project

POST
/v1/projects/{projectId}/integrations
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "client_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "project_role": "viewer" }'

As viewer, or inspector when it records element events. Only a person may do this; an integration’s token gets 403.

projectId
required
string format: uuid
Media typeapplication/json

The body of addProjectIntegration.

object
client_id
required
string format: uuid
project_role
required

A role another organisation’s integration holds.

string
Allowed values: viewer inspector

Added

Media typeapplication/json

An integration on the project.

object
client_id
required
string format: uuid
name
required
string
status
required

An integration’s state.

string
Allowed values: active disabled revoked
project_role
required

A role a member route gives.

string
Allowed values: viewer inspector admin
account_name
required
string
other_organisation
required
boolean

Example

{
"status": "active",
"project_role": "viewer"
}

Invalid body, parameters or Idempotency-Key

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_PROJECT_ROLE: only a person who is a project admin of the project’s organisation manages another organisation’s integration, so an integration always gets this; apps acting for such a person can

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

No such project, or no integration has this client_id

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INTEGRATION_ALREADY_MEMBER

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}