{"openapi":"3.1.0","info":{"title":"GridCrew REST API","version":"1.0.0","description":"Read GridCrew boards, create or update typed rows, and manage signed outbound webhooks with an organization-scoped API key.","license":{"name":"Proprietary"}},"servers":[{"url":"https://gridcrew.ai"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/boards":{"get":{"operationId":"listBoards","summary":"List boards","responses":{"200":{"description":"Active boards in the key's organization.","content":{"application/json":{"schema":{"type":"object","required":["boards"],"properties":{"boards":{"type":"array","items":{"$ref":"#/components/schemas/BoardSummary"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/boards/{boardId}":{"get":{"operationId":"getBoardSchema","summary":"Read a board schema","parameters":[{"$ref":"#/components/parameters/BoardId"}],"responses":{"200":{"description":"Board columns, labels, and groups.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/boards/{boardId}/rows":{"get":{"operationId":"listRows","summary":"List rows","parameters":[{"$ref":"#/components/parameters/BoardId"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"groupId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Rows and total count.","content":{"application/json":{"schema":{"type":"object","required":["total","rows"],"properties":{"total":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createRow","summary":"Create a row","parameters":[{"$ref":"#/components/parameters/BoardId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowWrite"}}}},"responses":{"201":{"description":"Created row.","content":{"application/json":{"schema":{"type":"object","required":["row"],"properties":{"row":{"$ref":"#/components/schemas/Row"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/rows/{rowId}":{"get":{"operationId":"getRow","summary":"Read a row","parameters":[{"$ref":"#/components/parameters/RowId"}],"responses":{"200":{"description":"One row.","content":{"application/json":{"schema":{"type":"object","required":["row"],"properties":{"row":{"$ref":"#/components/schemas/Row"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateRow","summary":"Update a row","parameters":[{"$ref":"#/components/parameters/RowId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowWrite"}}}},"responses":{"200":{"description":"Updated row.","content":{"application/json":{"schema":{"type":"object","required":["row"],"properties":{"row":{"$ref":"#/components/schemas/Row"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/webhooks":{"get":{"operationId":"listWebhooks","summary":"List outbound webhooks","responses":{"200":{"description":"Webhook subscriptions in the key's organization.","content":{"application/json":{"schema":{"type":"object","required":["webhooks"],"properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createWebhook","summary":"Create an outbound webhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Created subscription and one-time plaintext signing secret.","content":{"application/json":{"schema":{"type":"object","required":["webhook","secret"],"properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","pattern":"^gcwhsec_"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/webhooks/{webhookId}":{"get":{"operationId":"getWebhook","summary":"Read an outbound webhook","parameters":[{"$ref":"#/components/parameters/WebhookId"}],"responses":{"200":{"description":"One webhook subscription and its latest delivery.","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateWebhook","summary":"Update an outbound webhook","parameters":[{"$ref":"#/components/parameters/WebhookId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Updated webhook subscription.","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"disableWebhook","summary":"Disable an outbound webhook","parameters":[{"$ref":"#/components/parameters/WebhookId"}],"responses":{"204":{"description":"The webhook is disabled."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/webhooks/{webhookId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"List webhook deliveries","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Paginated delivery history.","content":{"application/json":{"schema":{"type":"object","required":["total","deliveries"],"properties":{"total":{"type":"integer","minimum":0},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/api/v1/webhooks/{webhookId}/test":{"post":{"operationId":"testWebhook","summary":"Send a test webhook","parameters":[{"$ref":"#/components/parameters/WebhookId"}],"responses":{"200":{"description":"The recorded result of the immediate test attempt.","content":{"application/json":{"schema":{"type":"object","required":["delivery"],"properties":{"delivery":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"gck_"}},"parameters":{"BoardId":{"name":"boardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"RowId":{"name":"rowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"WebhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"BoardSummary":{"type":"object","required":["id","name","description","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Row":{"type":"object","required":["id","name","groupId","version","createdAt","updatedAt","values"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"groupId":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"values":{"type":"object","additionalProperties":true}}},"RowWrite":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":10000},"groupId":{"type":"string","format":"uuid"},"values":{"type":"object","additionalProperties":true}}},"Webhook":{"type":"object","required":["id","organizationId","name","endpointUrl","eventTypes","secretPrefix","enabled","consecutiveFailures","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"endpointUrl":{"type":"string","format":"uri","pattern":"^https://"},"eventTypes":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"string"}},"secretPrefix":{"type":"string"},"enabled":{"type":"boolean"},"consecutiveFailures":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"disabledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"latestDelivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}}},"WebhookCreate":{"type":"object","required":["name","endpointUrl","eventTypes"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"endpointUrl":{"type":"string","format":"uri","pattern":"^https://"},"eventTypes":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"string","description":"An exact event, a namespace wildcard such as row.*, or *."}}}},"WebhookUpdate":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"endpointUrl":{"type":"string","format":"uri","pattern":"^https://"},"eventTypes":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"string"}},"enabled":{"type":"boolean"}}},"WebhookDelivery":{"type":"object","required":["id","eventType","status","attemptCount","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"status":{"type":"string","enum":["pending","processing","delivered","dead_letter"]},"attemptCount":{"type":"integer","minimum":0,"maximum":6},"responseStatus":{"anyOf":[{"type":"integer","minimum":100,"maximum":599},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"BadRequest":{"description":"The request or a typed value is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The API key creator is not an active Organization Admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The record does not exist in the key's organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"GridCrew could not complete the data-service request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}