Grant access to a trigger
POST
/triggers/{id}/access
const url = 'https://localhost:3000/api/v1/triggers/example/access';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"account_id":"example","permissions":["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://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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Trigger ID (UUID)
Request Body
Section titled “Request Body”Access grant details
Media typeapplication/json
object
account_id
required
string
permissions
required
Read=metadata, stats=data, hit=events, manage=all
Array<string>
Example generated
{ "account_id": "example", "permissions": [ "example" ]}Responses
Section titled “Responses”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"}