Skip to Content
Webhook and Utility API

Webhook and Utility API

This page covers the endpoints that support the rest of the API: managing webhooks, getting the authenticated user, and reference data (currencies, countries, states and cities).

Endpoints Overview

MethodEndpointDescription
GET/api/public-v1/webhookList webhooks
POST/api/public-v1/webhookCreate a webhook
GET/api/public-v1/webhook/{id}Get a webhook
PUT / PATCH/api/public-v1/webhook/{id}Update a webhook
DELETE/api/public-v1/webhook/{id}Delete a webhook
GET/api/public-v1/meGet the authenticated user
GET/api/public-v1/currenciesList currencies
GET/api/public-v1/countryList countries
GET/api/public-v1/stateList states of a country
GET/api/public-v1/cityList cities of a state

Every request must send the secret key header:

X-Secret-Key: your-secret-key-here Content-Type: application/json

Webhooks

Webhooks let TaskIP call a URL of yours when an event happens in the workspace. Each webhook stores a name, the target URL, the HTTP method used to call it, the list of events it listens to and optional custom headers.

Event names are strings such as contact.created, company.created, invoice.*, quotation.*, sales.pipeline.*, support.ticket.*, project.*, project.task.created, meeting.*, form.submitted, discussion.created, document.created, document.updated and document.published. The events list is not validated against a fixed list when you create a webhook.

List Webhooks

GET /api/public-v1/webhook

Query Parameters

ParameterTypeRequiredDescription
itemintegerNoItems per page (default: 10)
pageintegerNoPage number
event_prefixstringNoOnly return webhooks that listen to at least one event starting with this prefix (for example project.)

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/webhook?item=20" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "message": "Webhook List", "data": [ { "id": 1, "name": "CRM Sync", "events": ["contact.created", "invoice.created"], "method": "POST", "url": "https://example.com/hooks/taskip", "headers": [ { "Content-Type": "application/json" } ], "status": 1, "lastTriggered": "2 hours ago" } ], "links": { "first": "https://public-api.taskip.net/api/public-v1/webhook?page=1", "last": "https://public-api.taskip.net/api/public-v1/webhook?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "per_page": 10, "to": 1, "total": 1 } }
FieldDescription
status1 = active, 0 = inactive
lastTriggeredHuman readable time of the last call (for example 2 hours ago), or null if never triggered

Create a Webhook

POST /api/public-v1/webhook

Request Body

FieldTypeRequiredDescription
namestringYesWebhook name
urlstringYesTarget URL (must be a valid URL)
request_methodstringYesOne of GET, POST, PUT, DELETE (upper case)
eventsarrayYesList of event names to listen to
request_headersarrayNoCustom headers as a list of single-entry objects, for example [{"Authorization": "Bearer token"}]. A Content-Type: application/json header is added automatically if you do not send a Content-Type header

New webhooks are created active.

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/webhook" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "name": "CRM Sync", "url": "https://example.com/hooks/taskip", "request_method": "POST", "events": ["contact.created", "invoice.created"], "request_headers": [{ "Authorization": "Bearer your-token" }] }'

Example Response

{ "id": 1, "url": "https://example.com/hooks/taskip" }

Errors

  • 422 standard Laravel validation response, for example {"message": "The url field must be a valid URL.", "errors": {"url": ["The url field must be a valid URL."]}} (validated: name, request_method, events, url)

Get a Webhook

GET /api/public-v1/webhook/{id}

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/webhook/1" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "message": "Webhook Detail", "data": { "id": 1, "name": "CRM Sync", "events": ["contact.created", "invoice.created"], "method": "POST", "url": "https://example.com/hooks/taskip", "headers": [ { "Authorization": "Bearer your-token" }, { "Content-Type": "application/json" } ], "status": 1, "lastTriggered": null } }

If the webhook does not exist, the API responds with HTTP 404 and {"message": "Webhook Not Found"}.


Update a Webhook

PUT /api/public-v1/webhook/{id} PATCH /api/public-v1/webhook/{id}

PUT and PATCH behave the same. Updates are partial: only the fields you send are validated and changed; omitted fields keep their stored values.

Request Body

All fields are optional, but when a field is present it is validated.

FieldTypeDescription
namestringWebhook name (cannot be empty)
urlstringTarget URL (must be a valid URL)
request_methodstringOne of GET, POST, PUT, DELETE. Stored upper-cased
eventsarrayList of event names (cannot be empty)
request_headersarray or nullCustom headers (same format as create). When sent, they replace the stored headers and Content-Type: application/json is added if missing. Sending null resets the headers to just Content-Type: application/json. When omitted, the stored headers are kept

A body that fails validation returns 422 with the standard validation response, for example {"message": "The url field must be a valid URL.", "errors": {"url": ["..."]}}.

Example Request

curl -X PUT "https://public-api.taskip.net/api/public-v1/webhook/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "name": "CRM Sync v2", "url": "https://example.com/hooks/taskip-v2", "request_method": "POST", "events": ["contact.created"] }'

Example Response

{ "message": "Webhook Updated" }

If the webhook does not exist the API responds with HTTP 404 and {"message": "Webhook not found"}.


Delete a Webhook

DELETE /api/public-v1/webhook/{id}

Example Request

curl -X DELETE "https://public-api.taskip.net/api/public-v1/webhook/1" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "message": "Webhook Deleted" }

If the webhook does not exist the API responds with HTTP 404 and {"message": "Webhook not found"}.


Utility Endpoints

Get Authenticated User

Return the user that the secret key belongs to, and the workspace (tenant) key. Useful for verifying that a key works.

GET /api/public-v1/me

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/me" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "id": 3, "name": "Sarah Johnson", "email": "sarah@company.com", "tenant": "your-workspace" }

If no user is resolved for the request, the API returns 401 with {"message": "Unauthenticated."}.


Get Currencies

Return the list of currencies (taken from active countries, one entry per currency code).

GET /api/public-v1/currencies

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/currencies" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "message": "currencies list", "data": [ { "value": "USD", "label": "🇺🇸 United States dollar (USD)", "symbol": "$" }, { "value": "EUR", "label": "🇪🇺 Euro (EUR)", "symbol": "€" } ] }
FieldDescription
valueCurrency code, use this in currency fields of other endpoints
labelDisplay label: flag emoji, currency name and code
symbolCurrency symbol

Get Countries

Return all active countries ordered by name. No parameters.

GET /api/public-v1/country

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/country" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "data": [ { "id": 1, "name": "Afghanistan", "code": "AFG", "code2": "AF", "currency": "AFN", "currency_symbol": "؋", "flag": "🇦🇫" } ] }
FieldDescription
idCountry ID, use it as country_id in Get States
code / code2ISO 3166-1 alpha-3 / alpha-2 code

Get States

Return the active states of a country, ordered by name.

GET /api/public-v1/state

Query Parameters

ParameterTypeRequiredDescription
country_idintegerYesCountry ID from Get Countries
searchstringNoFilter states by name

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/state?country_id=1" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "data": [ { "id": 3901, "name": "Badakhshan", "country": "Afghanistan" } ] }

Errors

  • 422 {"error": {"msg": ["provide country id"]}} when country_id is missing

Get Cities

Return the active cities of a state, ordered by name.

GET /api/public-v1/city

Query Parameters

ParameterTypeRequiredDescription
state_idintegerYesState ID from Get States
searchstringNoFilter cities by name

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/city?state_id=3901" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "data": [ { "id": 52, "name": "Ashkasham", "state": "Badakhshan" } ] }

Errors

  • 422 {"error": {"msg": ["provide state id"]}} when state_id is missing

Common Errors

StatusDescription
401{"message": "Secret keys are missing."} - no X-Secret-Key header
404{"status": 404, "msg": "Workspace not found"} - unknown or expired secret key
503Workspace is in read-only maintenance and the request is a write
Last updated on