## Create signer

### cURL

```bash
curl --request POST \
  --url https://api.neynar.com/v2/farcaster/signer/ \
  --header 'x-api-key: NEYNAR_API_DOCS'
```

### Python

```python
import requests

url = "https://api.neynar.com/v2/farcaster/signer/"

headers = {"x-api-key": "NEYNAR_API_DOCS"}

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

print(response.text)
```

### JavaScript (Fetch)

```javascript
const options = {method: 'POST', headers: {'x-api-key': 'NEYNAR_API_DOCS'}};

fetch('https://api.neynar.com/v2/farcaster/signer/', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### PHP

```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.neynar.com/v2/farcaster/signer/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "x-api-key: NEYNAR_API_DOCS"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

### Go

```go
package main

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

func main() {

url := "https://api.neynar.com/v2/farcaster/signer/"

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

req.Header.Add("x-api-key", "NEYNAR_API_DOCS")

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

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

fmt.Println(string(body))
}
```

### Unirest (Java)

```java
HttpResponse<String> response = Unirest.post("https://api.neynar.com/v2/farcaster/signer/")
  .header("x-api-key", "NEYNAR_API_DOCS")
  .asString();
```

### Ruby

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

url = URI("https://api.neynar.com/v2/farcaster/signer/")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'NEYNAR_API_DOCS'

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

### Response Example

- **200** Ok

```json
{
  "public_key": "0x3daa8f99c5f760688a3c9f95716ed93dee5ed5d7722d776b7c4deac957755f22",
  "signer_uuid": "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec",
  "fid": 3,
  "object": "signer",
  "permissions": [],
  "signer_approval_url": "<string>"
}
```

- **Error Response**

```json
{
  "message": "<string>",
  "code": "<string>",
  "property": "<string>",
  "status": 123
}
```

### Authorizations

- **x-api-key**
  - Type: string
  - Header
  - Required: YES
  - Default: NEYNAR_API_DOCS

### Response Fields
- **public_key** (string, required) : Ed25519 public key
- **signer_uuid** (string, required) : UUID of the signer
- **status** (enum<string>, required) : Status options include `generated`, `pending_approval`, `approved`, `revoked`
- **fid** (integer<int32>) : Unique identifier of a farcaster user or app (must be >= 0)
- **object** (enum<string>) : Always `signer`
- **permissions** (enum<string[]>): Available options include `WRITE_ALL`, `READ_ONLY`, etc.
- **signer_approval_url** (string): Related topics to this endpoint.
