Create a database
const url = 'https://api-dev.mindflow.io/v1/organizations/%24CURRENT_ORGANIZATION_ID/databases';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","blueprintId":"incident-ir-v0","environmentIds":["$CURRENT_ENVIRONMENT_ID"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-dev.mindflow.io/v1/organizations/%24CURRENT_ORGANIZATION_ID/databases \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "blueprintId": "incident-ir-v0", "environmentIds": [ "$CURRENT_ENVIRONMENT_ID" ] }'Creates a database bound to a case blueprint (Incidents, Changes, Vulnerabilities, AI usage, or Blank). Items created in this database inherit that blueprint.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Opaque id of the organization that owns the resource. In a playbook step this can be filled from the current organization when the caller leaves it unset.
Example
ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742ID of the organization.
Request Bodyrequired
Section titled “Request Bodyrequired”Create an Incidents database (incident-ir-v0 blueprint). Items in this database use the Incidents schema.
object
Human-readable name for the database.
Catalog blueprint for items in this database.
Environments linked to this database. Omit or send an empty array to link the caller’s environment only. Any other environment id is rejected.
Create a Changes database (change-mgmt-v0 blueprint). Items in this database use the Changes schema.
object
Human-readable name for the database.
Catalog blueprint for items in this database.
Environments linked to this database. Omit or send an empty array to link the caller’s environment only. Any other environment id is rejected.
Create a Vulnerabilities database (vulnerability-v0 blueprint). Items in this database use the Vulnerabilities schema.
object
Human-readable name for the database.
Catalog blueprint for items in this database.
Environments linked to this database. Omit or send an empty array to link the caller’s environment only. Any other environment id is rejected.
Create an AI usage database (usage-ai-v0 blueprint). Items in this database use the AI usage schema.
object
Human-readable name for the database.
Catalog blueprint for items in this database.
Environments linked to this database. Omit or send an empty array to link the caller’s environment only. Any other environment id is rejected.
Create a Blank database (blank-v0 blueprint). Start from a minimal schema and edit in Studio Settings → Blueprint.
object
Human-readable name for the database.
Catalog blueprint for items in this database.
Environments linked to this database. Omit or send an empty array to link the caller’s environment only. Any other environment id is rejected.
Responses
Section titled “Responses”Database created successfully.
A database and the blueprint schema its items follow.
object
Organization that owns this database. Same value as the organizationId path parameter.
Database that owns items. Item property shape comes from this database’s schema snapshot.
Human-readable name of the database.
Blueprint snapshot copied onto the database at creation (blueprintId, label, jsonSchema). Use jsonSchema when creating or updating items so properties match this database.
object
Catalog blueprint used as the template when the database was created.
Human-readable schema label (for example Incidents).
JSON Schema that defines allowed item properties for this database.
object
Environments linked to this database (0..n). Empty means Global (org-wide).
When the database was created.
When the database was last updated.
Example
{ "organizationId": "$CURRENT_ORGANIZATION_ID", "schema": { "blueprintId": "incident-ir-v0" }, "environmentIds": [ "$CURRENT_ENVIRONMENT_ID" ]}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
The request was invalid. Common causes include:
- Invalid timestamp format.
- Using
cursorwithbeforeorafter. - Missing
limitwhen usingbeforeorafter. - Invalid field names in the
fieldsparameter.
See the error response for specific details about what went wrong.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always BAD_REQUEST on this response. Read detail for which value to change, then send a corrected request.
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "The request body or query is invalid.", "code": "BAD_REQUEST"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Authentication failed. The request lacks valid credentials or the provided credentials are invalid.
Ensure you have:
- A valid API key or token.
- Proper authentication headers.
- Required permissions.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always MISSING_OR_INVALID_TOKEN on this response. Branch on this value, not on detail.
Example
{ "type": "about:blank", "title": "Unauthorized", "status": 401, "detail": "The bearer token is missing or invalid.", "code": "MISSING_OR_INVALID_TOKEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Forbidden. The server understood the request but refuses to authorize it.
For connector APIs, this often indicates insufficient permissions on the remote system (for example SFTP write access denied).
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always FORBIDDEN on this response. The token was accepted and the action is not allowed.
Example
{ "type": "about:blank", "title": "Forbidden", "status": 403, "detail": "You cannot perform this action.", "code": "FORBIDDEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Too many requests. The request rate limit has been exceeded.
Please wait until the rate limit window resets before making additional requests.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always RATE_LIMIT_EXCEEDED on this response. Wait Retry-After seconds before retrying.
Example
{ "type": "about:blank", "title": "Too Many Requests", "status": 429, "detail": "The request rate limit has been exceeded.", "code": "RATE_LIMIT_EXCEEDED"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
Please try again later or contact support if the problem persists.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always INTERNAL_ERROR on this response. Retry later. Do not retry a create in a tight loop.
Example
{ "type": "about:blank", "title": "Internal Server Error", "status": 500, "detail": "The request could not be completed.", "code": "INTERNAL_ERROR"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.