---
title: "Initialize Registration Flow for APIs, Services, Apps, ..."
method: GET
path: "/self-service/registration/api"
tags: ["v0alpha1"]
---

# Initialize Registration Flow for APIs, Services, Apps, ...

`GET /self-service/registration/api`

This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.

If a valid provided session cookie or session token is provided, a 400 Bad Request error
will be returned unless the URL query parameter `?refresh=true` is set.

To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`.

You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks.

This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).

More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).

## Response `200`

selfServiceRegistrationFlow

- SelfServiceRegistrationFlow
  - `active` string — and so on.
  - `expires_at` string, date-time, required — ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
  - `id` string, uuid4, required
  - `issued_at` string, date-time, required — IssuedAt is the time (UTC) when the flow occurred.
  - `request_url` string, required — RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
  - `type` string — The flow type can either be `api` or `browser`.
  - `ui` UiContainer, required — Container represents a HTML Form. The container can work with both HTTP Form and JSON requests
    - `action` string, required — Action should be used as the form action URL `<form action="{{ .Action }}" method="post">`.
    - `messages` UiText[]
      - `context` object — The message's context. Useful when customizing messages.
      - `id` integer, required
      - `text` string, required — The message text. Written in american english.
      - `type` string, required
    - `method` string, required — Method is the form method (e.g. POST)
    - `nodes` UiNode[], required
      - `attributes` union, required
        - UiNodeInputAttributes — InputAttributes represents the attributes of an input node
          - `disabled` boolean, required — Sets the input's disabled field to true or false.
          - `label` UiText
            - `context` object — The message's context. Useful when customizing messages.
            - `id` integer, required
            - `text` string, required — The message text. Written in american english.
            - `type` string, required
          - `name` string, required — The input's element name.
          - `pattern` string — The input's pattern.
          - `required` boolean — Mark this input field as required.
          - `type` string, required
          - `value` unknown
        - UiNodeTextAttributes
          - `text` UiText, required
            - `context` object — The message's context. Useful when customizing messages.
            - `id` integer, required
            - `text` string, required — The message text. Written in american english.
            - `type` string, required
        - UiNodeImageAttributes
          - `src` string, required — The image's source URL. format: uri
        - UiNodeAnchorAttributes
          - `href` string, required — The link's href (destination) URL. format: uri
          - `title` UiText, required
            - `context` object — The message's context. Useful when customizing messages.
            - `id` integer, required
            - `text` string, required — The message text. Written in american english.
            - `type` string, required
      - `group` string, required
      - `messages` UiText[], required
        - `context` object — The message's context. Useful when customizing messages.
        - `id` integer, required
        - `text` string, required — The message text. Written in american english.
        - `type` string, required
      - `meta` Meta, required — This might include a label and other information that can optionally be used to render UIs.
        - `label` UiText
          - `context` object — The message's context. Useful when customizing messages.
          - `id` integer, required
          - `text` string, required — The message text. Written in american english.
          - `type` string, required
      - `type` string, required

## Other responses

- `400` — jsonError
- `500` — jsonError

## Changes

- **2021-07-13** `8f1b399ab6e6` — 1 breaking, 4 info
  - the response property `ui/nodes/items/attributes/oneOf[#/components/schemas/uiNodeInputAttributes]/value` became nullable for the status `200`
  - api operation id `initializeSelfServiceRegistrationForNativeApps` removed and replaced with `initializeSelfServiceRegistrationFlowWithoutBrowser`
  - api tag `v0alpha1` added
  - api tag `public` removed
  - …1 more
- **2021-05-18** `9123bcead5ed` — 5 info
  - api operation id `initializeSelfServiceRegistrationViaAPIFlow` removed and replaced with `initializeSelfServiceRegistrationForNativeApps`
  - the response property `error` became required for the status `400`
  - the response property `error` became required for the status `500`
  - the response property `error/message` became required for the status `400`
  - …1 more
- **2021-05-05** `381c760af46e` — 15 breaking, 18 warning, 66 info
  - the response property `error` became optional for the status `400`
  - the response property `error/message` became optional for the status `400`
  - the response property `type` became optional for the status `200`
  - added `subschema #1, subschema #2, subschema #3` to the `ui/nodes/items/attributes/oneOf[#/components/schemas/uiNodeInputAttributes]/value` response property `oneOf` list for the response status `200`
  - …95 more

[Change history](https://skmtc.dev/ory/apis/ory-identities-api/changes/self-service/registration/api/get.md)

---

[API](https://skmtc.dev/ory/apis/ory-identities-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-identities-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-identities-api/revisions/071bec03ddcd/schema)
