{ "openapi": "3.0.1", "info": { "description": "Webhooks", "version": "2.4.1", "title": "Webhooks", "termsOfService": "https://docs.basiq.io/en/collections/440849-privacy-terms-and-common-questions", "license": { "name": "Commercial", "url": "https://basiq.io" } }, "servers": [ { "description": "Basiq Webhooks", "url": "https://au-api.basiq.io" } ], "tags": [ { "name": "Webhooks", "description": "Basiq Webhooks" } ], "paths": { "/notifications/webhooks": { "get": { "tags": [ "Webhooks" ], "summary": "List all webhooks", "operationId": "listAppWebhooks", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string" }, "count": { "type": "integer" }, "size": { "type": "integer" }, "data": { "items": { "type": "object", "required": [ "url", "status", "subscribedEvents" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "type": { "type": "string", "example": "Webhook" }, "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "status": { "type": "string", "description": "status of the webhook.", "enum": [ "active", "pending-approval" ] }, "secret": { "type": "string", "description": "secret for signing the messages." }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhook" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhooks" }, "examples": { "Success": { "value": { "type": "list", "size": 1, "count": 1, "data": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My General Webhook", "description": "Webhook that catches all my events", "url": "https://piper.com/basiq-messages/", "status": "active", "subscribedEvents": "user.created", "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" } }, "links": { "self": "https://au-api.basiq.io/notifications/webhooks" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } } }, "/notifications/webhooks/{webhookId}": { "post": { "tags": [ "Webhooks" ], "summary": "Update a webhook", "operationId": "updateWebhook", "parameters": [ { "name": "webhookId", "required": true, "schema": { "type": "string" }, "in": "path", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "url" ], "properties": { "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "subscribedEvents": { "type": "array", "description": "one or more events that the webhook would send messages for.", "items": { "type": "string", "example": "user.created" } } } }, "example": { "name": "My General Webhook", "description": "Webhook to catch all events", "url": "https://piper.com/basiq-messages/", "subscribedEvents": "user.created" } } }, "description": "Webhook request object." }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "type": "object", "required": [ "url", "status", "subscribedEvents" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "type": { "type": "string", "example": "Webhook" }, "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "status": { "type": "string", "description": "status of the webhook.", "enum": [ "active", "pending-approval" ] }, "secret": { "type": "string", "description": "secret for signing the messages." }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhook" }, "examples": { "Success": { "value": { "type": "Webhook", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My General Webhook", "description": "Webhook that catches all my events", "url": "https://piper.com/basiq-messages/", "status": "active", "secret": "rfiuheo43934", "subscribedEvents": "user.created", "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "path-parameter-not-valid", "title": "Parameter value is not valid", "detail": "Webhook ID value is not valid", "source": { "parameter": "webhookId" } } ] } }, "Request not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "invalid-content", "title": "Invalid request content", "detail": "Posted request not valid." } ] } }, "Unsupported event types": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "invalid-content", "title": "Invalid request content", "detail": "Posted subscribedEvents contains unsupported event types." } ] } }, "Event already subscribed to": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "event-already-subscribed", "title": "Event already subscribed", "detail": "Posted subscribedEvents contains events that are already subscribed to for this application." } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-not-found", "title": "Requested resource is not found", "detail": "Webhook with provided id doesn't exist." } ] } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-already-exists", "title": "Resource already exists", "detail": "Webhook with provided url already exists." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } }, "delete": { "tags": [ "Webhooks" ], "summary": "Delete a webhook", "operationId": "deleteWebhook", "parameters": [ { "name": "webhookId", "required": true, "schema": { "type": "string" }, "in": "path", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "204": { "description": "Deletion successful (empty body)" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "path-parameter-not-valid", "title": "Parameter value is not valid", "detail": "Webhook ID value is not valid", "source": { "parameter": "webhookId" } } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-not-found", "title": "Requested resource is not found", "detail": "Webhook with provided id doesn't exist." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } }, "get": { "tags": [ "Webhooks" ], "summary": "Retrieve a webhook", "operationId": "getWebhook", "parameters": [ { "name": "webhookId", "required": true, "schema": { "type": "string" }, "in": "path", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "required": [ "url", "status", "subscribedEvents" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "type": { "type": "string", "example": "Webhook" }, "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "status": { "type": "string", "description": "status of the webhook.", "enum": [ "active", "pending-approval" ] }, "secret": { "type": "string", "description": "secret for signing the messages." }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhook" }, "examples": { "Success": { "value": { "type": "webhook", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My General Webhook", "description": "Webhook that catches all my events", "url": "https://piper.com/basiq-messages/", "status": "active", "subscribedEvents": "user.created", "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "path-parameter-not-valid", "title": "Parameter value is not valid", "detail": "Webhook ID value is not valid", "source": { "parameter": "webhookId" } } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-not-found", "title": "Requested resource is not found", "detail": "Webhook with provided id doesn't exist." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } } }, "/notifications/webhooks/{webhookId}/messages": { "get": { "tags": [ "Webhooks" ], "summary": "List all messages", "operationId": "listMessages", "parameters": [ { "name": "webhookId", "in": "path", "description": "webhook Id", "required": true, "schema": { "type": "string" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "limit", "in": "query", "description": "Maximum number of items included in the response. Max value = 500 and is the default value if this field is not provided", "style": "deepObject", "explode": false, "schema": { "type": "integer" }, "example": "10" }, { "name": "filter", "in": "query", "description": "Filter field that allows filtering by date, status, eventTypeId, webhookId, eventId", "style": "deepObject", "explode": false, "schema": { "type": "string" }, "example": "" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string" }, "count": { "type": "integer" }, "size": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook message." }, "webhookId": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "event": { "type": "string" }, "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "payload": { "type": "object", "properties": { "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "eventEntity": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } } }, "attempts": { "type": "array", "items": { "type": "string" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Message" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Messages" }, "examples": { "Success": { "value": { "type": "list", "size": 2, "count": 2, "data": [ { "id": "22a85f64-5717-4562-b3fc-2c963f66af22", "payload": { "eventTypeId": "user.created", "eventId": "55a85f64-5717-4562-b3fc-2c963f66af55", "links": { "event": "https://au-api.basiq.io/events/44a85f64-5717-4562-b3fc-2c963f66af44", "eventEntity": "https://au-api.basiq.io/users/12a85f64-5717-4562-b3fc-2c963f66af12" } }, "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6/messages/11a85f64-5717-4562-b3fc-2c963f66af11", "webhook": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" } } ], "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6/messages/" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "path-parameter-not-valid", "title": "Parameter value is not valid", "detail": "Webhook ID value is not valid", "source": { "parameter": "webhookId" } } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-not-found", "title": "Requested resource is not found", "detail": "Resource not found." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } } }, "/notifications/webhooks/{webhookId}/messages/{messageId}": { "get": { "tags": [ "Webhooks" ], "summary": "Retrieve a message", "operationId": "getWebhookMessage", "parameters": [ { "name": "webhookId", "in": "path", "description": "webhook Id", "required": true, "schema": { "type": "string" }, "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, { "name": "messageId", "in": "path", "description": "message Id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook message." }, "webhookId": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "event": { "type": "string" }, "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "payload": { "type": "object", "properties": { "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "eventEntity": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } } }, "attempts": { "type": "array", "items": { "type": "string" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Message" }, "examples": { "Success": { "value": { "id": "11a85f64-5717-4562-b3fc-2c963f66af11", "payload": { "eventTypeId": "user.created", "eventId": "44a85f64-5717-4562-b3fc-2c963f66af44", "links": { "event": "https://au-api.basiq.io/events/44a85f64-5717-4562-b3fc-2c963f66af44", "eventEntity": "https://au-api.basiq.io/users/88a85f64-5717-4562-b3fc-2c963f66af88" } }, "attempts": [ { "id": "e2du423ed", "url": "https://piper.com/basiq-messages/", "response": "OK", "responseStatusCode": 200, "timestamp": "2019-08-24T14:15:22Z", "status": "Success" }, { "id": "c3du423f1", "url": "https://piper.com/basiq-messages/", "response": "Internal Server Error", "responseStatusCode": "500", "timestamp": "2019-08-24T14:13:22Z", "status": "Failed" } ], "links": { "self": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6/messages/11a85f64-5717-4562-b3fc-2c963f66af11", "webhook": "https://au-api.basiq.io/notifications/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "path-parameter-not-valid", "title": "Parameter value is not valid", "detail": "Webhook ID value is not valid", "source": { "parameter": "webhookId" } } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Error": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "resource-not-found", "title": "Requested resource is not found", "detail": "Message not found." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } } }, "/notifications/messages/test": { "post": { "tags": [ "Webhooks" ], "summary": "Post a test message", "operationId": "testMessage", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "eventTypeId" ], "properties": { "eventTypeId": { "type": "string", "description": "The event type Id to be triggered. refer to /events/types/ for full list.", "example": "user.created" }, "Text": { "type": "string", "description": "Text field to be supplied and replayed back." } } }, "example": { "eventTypeId": "user.created", "Text": "My test message" } } } }, "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "WebhookID not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "no-webhooks-found", "title": "No webhooks found for an app", "detail": "No webhooks found for an app: 2a17dbd7-d397-428a-9eff-5048d2bed5c4, at least one webhook should exist in the system" } ] } }, "Request not valid": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "invalid-content", "title": "Invalid request content", "detail": "Posted request not valid." } ] } }, "Unsupported event types": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "invalid-content", "title": "Invalid request content", "detail": "Posted eventTypeId doesn't exists." } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Unauthorized": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "unauthorized-access", "title": "Unauthorized Access", "detail": "You are not authorized to access this resource" } ] } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Forbidden": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "forbidden-access", "title": "Forbidden Access", "detail": "Access to this resource is forbidden." } ] } } } } } }, "429": { "description": "Too many requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Too many requests": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "too-many-requests", "title": "Too many requests", "detail": "You have exceeded the rate limit for this API." } ] } } } } } }, "500": { "description": "Internal server error." }, "503": { "description": "Service unavailable", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "examples": { "Service unavailable": { "value": { "type": "list", "correlationId": "9b27dbd7-d397-428a-9eff-5048d2bed5eb", "data": [ { "type": "error", "code": "service-unavailable", "title": "Service Unavailable", "detail": "Service Unavailable. Try again later." } ] } } } } } } } } }, "/notifications/webhooks/{webhookId}/stats": { "get": { "tags": [ "Webhooks" ], "summary": "Get webhook delivery statistics", "operationId": "getWebhookStats", "parameters": [ { "name": "webhookId", "in": "path", "description": "webhook Id", "required": true, "schema": { "type": "string" }, "example": "d408cfec-b881-43ee-b5bd-ccea64896ed4" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookStats" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error" } } } } }, "components": { "schemas": { "Error": { "properties": { "type": { "type": "string", "description": "Always \"list\"." }, "correlationId": { "type": "string", "description": "Unique identifier for this particular occurrence of the problem." }, "data": { "type": "array", "description": "Error data.", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response, always \"error\"." }, "code": { "type": "string", "description": "Application-specific error code, expressed as a string value." }, "title": { "type": "string", "description": "Title of the error." }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem." }, "source": { "type": "object", "description": "An object containing references to the source of the error.", "properties": { "parameter": { "type": "string", "description": "String indicating which URI query parameter caused the error." } } } } } } }, "x-readme-ref-name": "Error" }, "Webhooks": { "properties": { "type": { "type": "string" }, "count": { "type": "integer" }, "size": { "type": "integer" }, "data": { "items": { "type": "object", "required": [ "url", "status", "subscribedEvents" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "type": { "type": "string", "example": "Webhook" }, "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "status": { "type": "string", "description": "status of the webhook.", "enum": [ "active", "pending-approval" ] }, "secret": { "type": "string", "description": "secret for signing the messages." }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhook" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhooks" }, "Webhook": { "type": "object", "required": [ "url", "status", "subscribedEvents" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "type": { "type": "string", "example": "Webhook" }, "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "status": { "type": "string", "description": "status of the webhook.", "enum": [ "active", "pending-approval" ] }, "secret": { "type": "string", "description": "secret for signing the messages." }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Webhook" }, "Messages": { "properties": { "type": { "type": "string" }, "count": { "type": "integer" }, "size": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook message." }, "webhookId": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "event": { "type": "string" }, "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "payload": { "type": "object", "properties": { "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "eventEntity": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } } }, "attempts": { "type": "array", "items": { "type": "string" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Message" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Messages" }, "Message": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook message." }, "webhookId": { "type": "string", "format": "uuid", "description": "unique identifer in the form of uuid for the webhook." }, "event": { "type": "string" }, "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "payload": { "type": "object", "properties": { "eventTypeId": { "type": "string" }, "eventId": { "type": "string" }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "eventEntity": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } } }, "attempts": { "type": "array", "items": { "type": "string" } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "event": { "type": "string" }, "webhook": { "type": "string" }, "next": { "type": "string" } } } }, "x-readme-ref-name": "Message" }, "WebhookStats": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the response object.", "example": "webhook_stats" }, "applicationId": { "type": "string", "format": "uuid", "description": "unique identifier in the form of uuid for the application." }, "webhookId": { "type": "string", "format": "uuid", "description": "unique identifier in the form of uuid for the webhook." }, "success": { "type": "integer", "description": "Number of successfully delivered messages.", "example": 1 }, "pending": { "type": "integer", "description": "Number of messages pending delivery.", "example": 0 }, "sending": { "type": "integer", "description": "Number of messages currently being sent.", "example": 0 }, "fail": { "type": "integer", "description": "Number of failed message deliveries.", "example": 0 } }, "x-readme-ref-name": "WebhookStats" } }, "requestBodies": { "Webhook": { "content": { "application/json": { "schema": { "type": "object", "required": [ "url" ], "properties": { "name": { "type": "string", "description": "name to describe the webhook." }, "description": { "type": "string", "description": "detailed description of the webhook." }, "url": { "type": "string", "description": "url to send webhooks to." }, "subscribedEvents": { "type": "array", "description": "one or more events that the webhook would send messages for.", "items": { "type": "string", "example": "user.created" } } } }, "example": { "name": "My General Webhook", "description": "Webhook to catch all events", "url": "https://piper.com/basiq-messages/", "subscribedEvents": "user.created" } } }, "description": "Webhook request object." }, "TestMessage": { "content": { "application/json": { "schema": { "type": "object", "required": [ "eventTypeId" ], "properties": { "eventTypeId": { "type": "string", "description": "The event type Id to be triggered. refer to /events/types/ for full list.", "example": "user.created" }, "Text": { "type": "string", "description": "Text field to be supplied and replayed back." } } }, "example": { "eventTypeId": "user.created", "Text": "My test message" } } } } }, "securitySchemes": { "services_token": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "services_token": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true, "samples-languages": [ "curl", "node", "ruby", "javascript", "python" ] } }