Get a workflow's trigger fields
curl --request GET \
--url https://api.pineyard.ai/v1/workflows/{id}/trigger-contract \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/v1/workflows/{id}/trigger-contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/workflows/{id}/trigger-contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"fields": [
{
"name": "<string>",
"type": "string",
"description": "<string>",
"declared": true,
"used": true
}
],
"undeclared": [
"<string>"
],
"unused": [
"<string>"
]
}Workflows
Get a workflow's trigger fields
Which lead.fields this workflow reads — derived from its graph, so it cannot drift. Send these names (exactly) as lead.fields when pushing a lead to a journey campaign built on it.
GET
/
v1
/
workflows
/
{id}
/
trigger-contract
Get a workflow's trigger fields
curl --request GET \
--url https://api.pineyard.ai/v1/workflows/{id}/trigger-contract \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/v1/workflows/{id}/trigger-contract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/workflows/{id}/trigger-contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"fields": [
{
"name": "<string>",
"type": "string",
"description": "<string>",
"declared": true,
"used": true
}
],
"undeclared": [
"<string>"
],
"unused": [
"<string>"
]
}Required scope:
workflows.view
Scopes apply to scoped API keys. Keys issued without scopes can call every
/v1 endpoint.
