Create a new data request

POST /requests

Used by the authenticated user to create a new data request from the organisation. The amount of data requests that can be simultaneously in progress is set by the organisation, and can be retrieved from the /settings endpoint.

Body

Describes the datatypes that the user wishes to request from the organisation. These must match the type parameters that are available form the /data eindpoint. If the request body is omitted, the data request is created for all available data types.

array[string] array[string]

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • requestId string(uuid) Required

      A random identifier that uniquely identifies a request. A version 4 UUID is strongly recommended. Note: the generated identifier must be random. The identifier must not include any information that can be related to the requester. Additionally, requestIds must not be incremental.

    • createdAt string(date-time) Required

      A date-time detailing when the request was made

    • expectedCompletion string(date-time)

      An optional date-time detailing when the request is expected to be completed

    • isCompleted boolean Required

      Whether the request has been completed already

    • completedAt string(date-time)

      An optional date-time detailing when the request was completed.

    • dataRequested array[string] Required

      Identifier of a data type that was requested

  • 400

    Bad Request

    One of:
  • 401

    Unauthorized

    Hide response attributes Show response attributes object
    • error string

      Value is Unauthorized.

    • message string

      Value is You are not authorized. Generate authentication tokens via OAuth to access this resource..

POST /requests
curl \
 -X POST http://api.example.com/requests \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '["LikeAction"]'
Request example
[
  "LikeAction"
]
Request examples
[
  "LikeAction"
]
Response examples (200)
{
  "requestId": "string",
  "createdAt": "2023-05-04T09:42:00+00:00",
  "expectedCompletion": "2023-05-04T09:42:00+00:00",
  "isCompleted": true,
  "completedAt": "2023-05-04T09:42:00+00:00",
  "dataRequested": [
    "string"
  ]
}
Response examples (200)
{
  "requestId": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "expectedCompletion": "2025-05-04T09:42:00Z",
  "isCompleted": true,
  "completedAt": "2025-05-04T09:42:00Z",
  "dataRequested": [
    "string"
  ]
}
Response examples (400)
{
  "error": "MaximumAmountOfRequestsReached",
  "message": "The maximum amount of requests has been reached."
}
{
  "error": "InvalidDataTypes",
  "message": "The data types that were specified do not match the available datatypes for this organisation."
}
Response examples (400)
{
  "error": "MaximumAmountOfRequestsReached",
  "message": "The maximum amount of requests has been reached."
}
{
  "error": "InvalidDataTypes",
  "message": "The data types that were specified do not match the available datatypes for this organisation."
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "You are not authorized. Generate authentication tokens via OAuth to access this resource."
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "You are not authorized. Generate authentication tokens via OAuth to access this resource."
}