building-apis
Installation
SKILL.md
Building APIs
An API is a RESTful endpoint that exposes integration logic for external consumption. External systems call the API over HTTP; the API processes the request through lookups and imports, then returns a structured response. Concerns when building an API:
- Mode selection -- builder (visual configuration) vs script (full JavaScript control)
- Request definition -- HTTP method, URI path, parameters, body schema, request transformation
- Processing pipeline -- routers and page processors (lookups + imports) that execute business logic
- Response routing -- directing processed data to the correct response definition based on success/failure or custom conditions
- Response shaping -- status codes, field mappings, body schema, hooks (preMap, postMap) on each response
- Response mapping -- extracting fields from each page processor's response back into the record for downstream steps. Configured on each
pageProcessors[]entry, same as in flows. For lookup exports the response hasdata[]anderrors[](usedata[0].fieldNamefor single results). For imports the response is via_json(use_json.fieldName) - postResponseMap hook -- JavaScript processing after response mapping, configured on
pageProcessors[]entries
Used across integrations alongside flows and tools. APIs do not have their own authentication -- incoming requests authenticate via the Celigo API token; outbound calls to external systems use the connections referenced by exports/imports in the pipeline.