> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aurasos.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aurasos.com/_mcp/server.

# Complete customer registration

POST https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete
Content-Type: application/json

Checks the one-time code for an open verification session. When it is correct and the number is eligible for this customer source, the customer is created, or the existing customer for that number is used, and a customer access token is returned. A session can be completed once.

Reference: https://docs.aurasos.com/api-reference/authentication/complete-customer-registration

## Servers

- `https://staging-panic.aura.services` (Staging, default)
- `https://panic.aura.services` (Production)

## Request

### Body (application/json)

This endpoint expects a RegistrationCompleteRequest.

- `verificationId` (string, required)
- `otp` (string, required) — The code sent by SMS.

## Response

### 200

The number was verified and a customer access token was issued.

- `accessToken` (string, optional)
- `tokenType` (string, optional)
- `expiresIn` (integer, optional) — Token lifetime in seconds. The API accepts values up to the documented maximum.

## Errors

### 400 Bad Request Error

The request body is invalid.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 401 Unauthorized Error

The code is wrong. The session stays open until it expires or runs out of attempts.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 403 Forbidden Error

The number was verified but is not eligible to register with this customer source.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 404 Not Found Error

The verification session does not exist.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 410 Gone Error

The verification session expired or was already completed. Start registration again.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 429 Too Many Requests Error

Too many attempts. The session is locked, or the request rate limit was reached.

- `error` (enum, required)
  - Allowed values: `invalid_request`, `unknown_client`, `otp_not_sent`, `verification_superseded`, `verification_failed`, `not_eligible`, `verification_not_found`, `verification_expired`, `too_many_attempts`, `rate_limited`
- `message` (string, optional)
- `errors` (map from string to list of string, optional) — Field-level validation errors, returned with `invalid_request`.
- `attemptsRemaining` (integer, optional) — Returned with `verification_failed`.

### 500 Internal Server Error

Unexpected server error.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

## Types

### ErrorResponseErrors

Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

- string
- list of string
- map from string to any

## Examples

**Request**

```json
{
  "verificationId": "3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10",
  "otp": "123456"
}
```

**Response**

```json
{
  "accessToken": "string",
  "tokenType": "Bearer",
  "expiresIn": 2147483647
}
```

**SDK Code**

```python Success
import requests

url = "https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete"

payload = {
    "verificationId": "3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10",
    "otp": "123456"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Success
const url = 'https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"verificationId":"3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10","otp":"123456"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete"

	payload := strings.NewReader("{\n  \"verificationId\": \"3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10\",\n  \"otp\": \"123456\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"verificationId\": \"3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10\",\n  \"otp\": \"123456\"\n}"

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete")
  .header("Content-Type", "application/json")
  .body("{\n  \"verificationId\": \"3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10\",\n  \"otp\": \"123456\"\n}")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete', [
  'body' => '{
  "verificationId": "3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10",
  "otp": "123456"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"verificationId\": \"3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10\",\n  \"otp\": \"123456\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "verificationId": "3f0b1f5e-8f5c-4b8e-9f3a-2d6c1f9b7a10",
  "otp": "123456"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://staging-panic.aura.services/panic-api/v2/oauth/registrations/complete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```