Skip to content

Grant access to a trigger

POST
/triggers/{id}/access
curl --request POST \
--url https://localhost:3000/api/v1/triggers/example/access \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "account_id": "example", "permissions": [ "example" ] }'

Grants access to a trigger for another account

id
required
string

Trigger ID (UUID)

Access grant details

Media typeapplication/json
object
account_id
required
string
permissions
required

Read=metadata, stats=data, hit=events, manage=all

Array<string>
>= 1 items

Example generated

{
"account_id": "example",
"permissions": [
"example"
]
}

Created

Media typeapplication/json
object
account_id
required
string
granted_at
required
string
granted_by
required
string
id
required
string
permissions
required
Array<string>
trigger_id
required
string

Example generated

{
"account_id": "example",
"granted_at": "example",
"granted_by": "example",
"id": "example",
"permissions": [
"example"
],
"trigger_id": "example"
}

Bad Request

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Unauthorized

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Forbidden

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Not Found

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}