Skip to content

Activate process

Endpoint

PUT /organizations/{org_id}/runs/{run_id}/activate

This endpoint restores (unarchives) a previously archived process instance (run), making it active again.

Request

Replace {org_id} with your Organization ID and {run_id} with the ID of the process run to activate.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Body

No request body is needed for this PUT request.

Code Samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const runId = 'PROCESS_RUN_ID_TO_ACTIVATE';
const apiUrl = `https://api.tallyfy.com/organizations/${orgId}/runs/${runId}/activate`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'PUT', // Use PUT method
headers: headers
})
.then(response => {
if (!response.ok) { // Expect 200 OK
// Error handling...
return response.json().then(errData => { throw new Error(/*...*/); }).catch(() => { throw new Error(/*...*/); });
}
console.log(`Successfully activated process ${runId}. Status: ${response.status}`);
return response.json(); // Activation returns the updated process
})
.then(data => {
console.log('Activated process details:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error activating process ${runId}:`, error);
});

Response

A successful request returns a 200 OK status code. The response body contains the details of the reactivated process run, with the archived_at timestamp removed and the status updated (likely to its pre-archive state, e.g., active or complete).

{
"data": {
"id": "PROCESS_RUN_ID_TO_ACTIVATE",
"name": "Restored Project Run",
"status": "active", // Or 'complete', etc.
"archived_at": null, // Timestamp is removed
// ... other process properties ...
"last_updated": "2024-05-22T11:00:00Z" // Reflects activation time
}
}

If the process run ID is not found, was not archived, or you lack permission, an error status code (404, 400, 403) will be returned.