This API call allows you to generate new links for a specific onboarding request. The links are generated for each actor involved in the onboarding process. If the request type involves a simple user onboarding, only one link will be generated. You can invoke this API to generate new links until the request expires, but previously created links remain usable.
Endpoint
URL:
/request/{id}/links
Method:
POST
Headers
Ensure you include the following headers in your request:
Accept: application/json
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
(replaceYOUR_API_KEY
with your actual API key)
Path Parameters
id (required): The unique identifier of the request for which you want to generate links. This should be included in the URL path. Example:
123e4567-e89b-12d3-a456-426614174000
Request Body
The request body should be in JSON format and can include the following optional field:
onlyForActors (optional): An array of actor names for whom the links should be generated. If not provided, links will be generated for all actors. Example:
{ "onlyForActors": ["actor1", "actor2"] }
Example cURL API call
curl -X POST "https://test.onboarding.namirial.app/api/v2/request/YOUR_REQUEST_ID/links" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "X-Api-Key: YOUR_API_KEY" \ -d '{ "onlyForActors": ["customer"] }'
Responses
200 OK
Description: The generated links for the specified request.
Example Response:
{ "links": [ { "actor": "customer", "link": "https://onboarding.example/res/3949?ts=49943", "expiresAfter": "2024-11-29T17:42:16.269594Z" } ] }
400 Bad Request
Description: Bad Request described following Problem Details (RFC 9457).
Example Response:
{ "type": "about:blank", "status": 400, "title": "Request validation error", "detail": "The has a malformed body property.", "instance": "urn:uuid:123e4567-e89b-12d3-a456-426614174000?ts=1729667463", "retryable": false, "errors": [ { "detail": "Property 'actors' is not defined in the schema and the schema does not allow additional properties.", "pointer": "/actors", "field": "actors", "reason": "additionalProperties" } ] }