# post\_\_register

`POST /register`

*Register Bridge Node*

Register a new bridge node with the Flashback platform using cryptographic signature verification for authentication.

This endpoint allows bridge nodes to register themselves with the platform without requiring traditional authentication. Instead, it uses RSA signature verification to ensure the request comes from an authorized organization key.

**Key Features:**

* Cryptographic signature verification using RSA keys
* Automatic node-key association upon successful registration
* Support for multiple cloud providers (AWS, GCS, Azure, S3-compatible)
* Node status and region tracking
* Version information capture for compatibility monitoring

**Authentication:**

* No traditional authentication required
* Uses RSA signature verification for security
* Signature must be generated using a valid organization private key
* Timestamp validation prevents replay attacks

**Supported Providers:**

* `S3`: AWS S3 and S3-compatible services
* `GCS`: Google Cloud Storage
* `AZURE`: Azure Blob Storage

**Validation:**

* All required fields must be present
* Provider type must be valid
* Signature must be cryptographically valid
* Timestamp must be recent to prevent replay attacks

#### TypeScript Client Library

```typescript
public nodeRegister = async (data: RegisterRequest): Promise<RegisterResponse> => {
  return this.makeRequest<RegisterResponse>('register', 'POST', data);
};
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
# You can also use wget
curl -X POST https://backend.flashback.tech/register \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "provider": "S3",
    "ip": "192.168.1.100",
    "status": "active",
    "region": "us-east-1",
    "version": "1.0.0",
    "timestamp": "2024-01-15T10:30:00.000Z",
    "signature": "base64-encoded-signature",
    "id_org": "org-123e4567-e89b-12d3-a456-426614174000"
  }'
```

{% endtab %}

{% tab title="HTTP" %}

```http
POST https://backend.flashback.tech/register HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/json

{
  "provider": "S3",
  "ip": "192.168.1.100",
  "status": "active",
  "region": "us-east-1",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "signature": "base64-encoded-signature",
  "id_org": "org-123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const inputBody = {
  "provider": "S3",
  "ip": "192.168.1.100",
  "status": "active",
  "region": "us-east-1",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "signature": "base64-encoded-signature",
  "id_org": "org-123e4567-e89b-12d3-a456-426614174000"
};

const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://backend.flashback.tech/register',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

body = {
  'provider' => 'S3',
  'ip' => '192.168.1.100',
  'status' => 'active',
  'region' => 'us-east-1',
  'version' => '1.0.0',
  'timestamp' => '2024-01-15T10:30:00.000Z',
  'signature' => 'base64-encoded-signature',
  'id_org' => 'org-123e4567-e89b-12d3-a456-426614174000'
}

result = RestClient.post 'https://backend.flashback.tech/register',
  body.to_json, headers: headers

p JSON.parse(result)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

body = {
  'provider': 'S3',
  'ip': '192.168.1.100',
  'status': 'active',
  'region': 'us-east-1',
  'version': '1.0.0',
  'timestamp': '2024-01-15T10:30:00.000Z',
  'signature': 'base64-encoded-signature',
  'id_org': 'org-123e4567-e89b-12d3-a456-426614174000'
}

r = requests.post('https://backend.flashback.tech/register', 
                  headers=headers, 
                  data=json.dumps(body))

print(r.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$body = array(
    'provider' => 'S3',
    'ip' => '192.168.1.100',
    'status' => 'active',
    'region' => 'us-east-1',
    'version' => '1.0.0',
    'timestamp' => '2024-01-15T10:30:00.000Z',
    'signature' => 'base64-encoded-signature',
    'id_org' => 'org-123e4567-e89b-12d3-a456-426614174000'
);

$client = new \GuzzleHttp\Client();

try {
    $response = $client->request('POST','https://backend.flashback.tech/register', array(
        'headers' => $headers,
        'json' => $body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
```

{% endtab %}

{% tab title="Java" %}

```java
URL obj = new URL("https://backend.flashback.tech/register");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Accept", "application/json");

String jsonInputString = "{\"provider\":\"S3\",\"ip\":\"192.168.1.100\",\"status\":\"active\",\"region\":\"us-east-1\",\"version\":\"1.0.0\",\"timestamp\":\"2024-01-15T10:30:00.000Z\",\"signature\":\"base64-encoded-signature\",\"id_org\":\"org-123e4567-e89b-12d3-a456-426614174000\"}";

con.setDoOutput(true);
try(OutputStream os = con.getOutputStream()) {
    byte[] input = jsonInputString.getBytes("utf-8");
    os.write(input, 0, input.length);
}

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
       "bytes"
       "net/http"
       "encoding/json"
)

func main() {
    body := map[string]interface{}{
        "provider": "S3",
        "ip": "192.168.1.100",
        "status": "active",
        "region": "us-east-1",
        "version": "1.0.0",
        "timestamp": "2024-01-15T10:30:00.000Z",
        "signature": "base64-encoded-signature",
        "id_org": "org-123e4567-e89b-12d3-a456-426614174000",
    }

    jsonData, _ := json.Marshal(body)

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer(jsonData)
    req, err := http.NewRequest("POST", "https://backend.flashback.tech/register", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
```

{% endtab %}
{% endtabs %}

> Body parameter

```json
{
  "provider": "S3",
  "ip": "192.168.1.100",
  "status": "active",
  "region": "us-east-1",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "signature": "base64-encoded-signature",
  "id_org": "org-123e4567-e89b-12d3-a456-426614174000"
}
```

#### Parameters <a href="#post__register-parameters" id="post__register-parameters"></a>

| Name        | In   | Type   | Required | Description                                  |
| ----------- | ---- | ------ | -------- | -------------------------------------------- |
| body        | body | object | true     | Node registration data                       |
| » provider  | body | string | true     | Cloud storage provider type                  |
| » ip        | body | string | true     | Node IP address (used as unique identifier)  |
| » status    | body | string | true     | Node status (e.g., active, inactive)         |
| » region    | body | string | true     | Geographic region of the node                |
| » version   | body | string | true     | Node software version                        |
| » timestamp | body | string | true     | Request timestamp for signature verification |
| » signature | body | string | true     | RSA signature of the request data            |
| » id\_org   | body | string | false    | Organization ID (optional)                   |

**Enumerated Values**

| Parameter  | Value |
| ---------- | ----- |
| » provider | S3    |
| » provider | GCS   |
| » provider | AZURE |

> Example responses

> 200 Response

```json
{
  "success": true,
  "message": "Registration successful"
}
```

> 400 Response

```json
{
  "success": false,
  "message": "Missing required fields"
}
```

#### Responses <a href="#post__register-responses" id="post__register-responses"></a>

| Status | Meaning                                                                    | Description                           | Schema |
| ------ | -------------------------------------------------------------------------- | ------------------------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)                    | Node registered successfully          | Inline |
| 400    | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)           | Validation error or invalid signature | Inline |
| 500    | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | Registration failed                   | Inline |

#### Response Schema <a href="#post__register-responseschema" id="post__register-responseschema"></a>

Status Code **200**

| Name      | Type    | Required | Restrictions | Description              |
| --------- | ------- | -------- | ------------ | ------------------------ |
| » success | boolean | false    | none         | Operation success status |
| » message | string  | false    | none         | Success message          |

Status Code **400**

| Name      | Type    | Required | Restrictions | Description                                   |
| --------- | ------- | -------- | ------------ | --------------------------------------------- |
| » success | boolean | false    | none         | Operation success status                      |
| » message | string  | false    | none         | Error message describing the validation issue |

Status Code **500**

| Name      | Type    | Required | Restrictions | Description                                 |
| --------- | ------- | -------- | ------------ | ------------------------------------------- |
| » success | boolean | false    | none         | Operation success status                    |
| » message | string  | false    | none         | Error message describing the internal error |

This operation does not require authentication as it uses cryptographic signature verification for security.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/storage-apis/node-registration/post__register.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
