# Create Verified Sender Request

## API Overview

The Sender Verification API exposes multiple endpoints that allow you to programmatically manage the [Sender Identities](/docs/sendgrid/for-developers/sending-email/sender-identity/) that are authorized to send email for your account. You can also manage Sender Identities in the SendGrid app by selecting [**Sender Authentication** under **Settings** in the navigation bar](https://app.sendgrid.com/settings/sender_auth). For full app instructions, see [Sender Verification](/docs/sendgrid/ui/sending-email/sender-verification/).

The Sender Verification API provides a RESTful interface for creating new Sender Identities, retrieving a list of existing Sender Identities, checking the status of a Sender Identity, updating a Sender Identity, and deleting a Sender Identity.

This API offers additional endpoints to check for domains known to implement DMARC, and resend verification emails to Sender Identities that have yet to complete the verification process.

## Operation overview

```json
{"path":"https://api.sendgrid.com/v3/verified_senders","method":"post","servers":[{"url":"https://api.sendgrid.com","description":"for global users and subusers"},{"url":"https://api.eu.sendgrid.com","description":"for EU regional subusers"}]}
```

**This endpoint allows you to create a new Sender Identify**.

Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender.

If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint.

If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](/docs/sendgrid/api-reference/domain-authentication/authenticate-a-domain).

## Operation details

### Authentication

API Key

### Headers

```json
[{"in":"header","name":"Authorization","required":true,"default":"Bearer <<YOUR_API_KEY_HERE>>","schema":{"type":"string"}}]
```

### Request body

```json
{"schema":{"title":"Verified Sender Request Schema","type":"object","required":["nickname","from_email","reply_to"],"example":{"nickname":"Orders","from_email":"orders@example.com","from_name":"Example Orders","reply_to":"orders@example.com","reply_to_name":"Example Orders","address":"1234 Fake St","address2":"PO Box 1234","state":"CA","city":"San Francisco","country":"USA","zip":"94105"},"refName":"VerifiedSenderRequest","modelName":"VerifiedSenderRequest","properties":{"nickname":{"type":"string","maxLength":100},"from_email":{"type":"string","maxLength":256,"format":"email"},"from_name":{"type":"string","maxLength":256},"reply_to":{"type":"string","maxLength":256,"format":"email"},"reply_to_name":{"type":"string","maxLength":256},"address":{"type":"string","maxLength":100},"address2":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":2},"city":{"type":"string","maxLength":150},"zip":{"type":"string","maxLength":10},"country":{"type":"string","maxLength":100}}},"encodingType":"application/json"}
```

### Responses

```json
[{"responseCode":"201","schema":{"description":"","content":{"application/json":{"schema":{"title":"Verified Sender Response Schema","type":"object","example":{"id":1234,"nickname":"Example Orders","from_email":"orders@example.com","from_name":"Example Orders","reply_to":"orders@example.com","reply_to_name":"Example Orders","address":"1234 Fake St.","address2":"PO Box 1234","state":"CA","city":"San Francisco","country":"USA","zip":"94105","verified":true,"locked":false},"refName":"VerifiedSenderResponse","modelName":"VerifiedSenderResponse","properties":{"id":{"type":"integer"},"nickname":{"type":"string"},"from_email":{"type":"string"},"from_name":{"type":"string"},"reply_to":{"type":"string"},"reply_to_name":{"type":"string"},"address":{"type":"string"},"address2":{"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"verified":{"type":"boolean"},"locked":{"type":"boolean"}}},"examples":{"response":{"value":{"id":1234,"nickname":"Example Orders","from_email":"orders@example.com","from_name":"Example Orders","reply_to":"orders@example.com","reply_to_name":"Example Orders","address":"1234 Fake St.","address2":"PO Box 1234","state":"CA","city":"San Francisco","country":"USA","zip":"94105","verified":true,"locked":false}}}}}}},{"responseCode":"400","schema":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["message","error_id"],"properties":{"field":{"type":"string"},"message":{"type":"string"},"error_id":{"type":"string"}}}}}}}}}},{"responseCode":"401","schema":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"errors":[{"field":"field_name","message":"error message"}]},"refName":"ErrorResponse","modelName":"ErrorResponse","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","description":"An error message."},"field":{"description":"When applicable, this property value will be the field that generated the error.","nullable":true,"type":"string"},"help":{"type":"object","description":"When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error."}}}},"id":{"type":"string","description":"When applicable, this property value will be an error ID."}}}}},"refName":"#/components/responses/VerifiedSenders401","modelName":"__components_responses_VerifiedSenders401"}},{"responseCode":"403","schema":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"errors":[{"field":"field_name","message":"error message"}]},"refName":"ErrorResponse","modelName":"ErrorResponse","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","description":"An error message."},"field":{"description":"When applicable, this property value will be the field that generated the error.","nullable":true,"type":"string"},"help":{"type":"object","description":"When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error."}}}},"id":{"type":"string","description":"When applicable, this property value will be an error ID."}}}}},"refName":"#/components/responses/VerifiedSenders403","modelName":"__components_responses_VerifiedSenders403"}},{"responseCode":"404","schema":{"description":"","content":{"application/json":{"schema":{"type":"object","example":{"errors":[{"field":"field_name","message":"error message"}]},"refName":"ErrorResponse","modelName":"ErrorResponse","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","description":"An error message."},"field":{"description":"When applicable, this property value will be the field that generated the error.","nullable":true,"type":"string"},"help":{"type":"object","description":"When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error."}}}},"id":{"type":"string","description":"When applicable, this property value will be an error ID."}}}}},"refName":"#/components/responses/VerifiedSenders404","modelName":"__components_responses_VerifiedSenders404"}},{"responseCode":"500","schema":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"refName":"#/components/responses/VerifiedSenders500","modelName":"__components_responses_VerifiedSenders500"}}]
```

Create Verified Sender Request

```js
const client = require("@sendgrid/client");
client.setApiKey(process.env.SENDGRID_API_KEY);

const data = {
  nickname: "Orders",
  from_email: "orders@example.com",
  from_name: "Example Orders",
  reply_to: "orders@example.com",
  reply_to_name: "Example Orders",
  address: "1234 Fake St",
  address2: "PO Box 1234",
  state: "CA",
  city: "San Francisco",
  country: "USA",
  zip: "94105",
};

const request = {
  url: `/v3/verified_senders`,
  method: "POST",
  body: data,
};

client
  .request(request)
  .then(([response, body]) => {
    console.log(response.statusCode);
    console.log(response.body);
  })
  .catch((error) => {
    console.error(error);
  });
```

```python
import os
from sendgrid import SendGridAPIClient


sg = SendGridAPIClient(os.environ.get("SENDGRID_API_KEY"))

data = {
    "nickname": "Orders",
    "from_email": "orders@example.com",
    "from_name": "Example Orders",
    "reply_to": "orders@example.com",
    "reply_to_name": "Example Orders",
    "address": "1234 Fake St",
    "address2": "PO Box 1234",
    "state": "CA",
    "city": "San Francisco",
    "country": "USA",
    "zip": "94105",
}

response = sg.client.verified_senders.post(request_body=data)

print(response.status_code)
print(response.body)
print(response.headers)
```

```csharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SendGrid;

public class Program {
    public static async Task Main() {
        string apiKey = Environment.GetEnvironmentVariable("SENDGRID_API_KEY");
        var client = new SendGridClient(apiKey);

        var data =
            @"{
            ""nickname"": ""Orders"",
            ""from_email"": ""orders@example.com"",
            ""from_name"": ""Example Orders"",
            ""reply_to"": ""orders@example.com"",
            ""reply_to_name"": ""Example Orders"",
            ""address"": ""1234 Fake St"",
            ""address2"": ""PO Box 1234"",
            ""state"": ""CA"",
            ""city"": ""San Francisco"",
            ""country"": ""USA"",
            ""zip"": ""94105""
        }";

        var response = await client.RequestAsync(
            method: SendGridClient.Method.POST, urlPath: "verified_senders", requestBody: data);

        Console.WriteLine(response.StatusCode);
        Console.WriteLine(response.Body.ReadAsStringAsync().Result);
        Console.WriteLine(response.Headers.ToString());
    }
}
```

```java
import com.sendgrid.*;
import java.io.IOException;
import org.json.JSONObject;
import java.util.HashMap;

public class Example {
    public static void main(String[] args) throws IOException {
        try {
            SendGrid sg = new SendGrid(System.getenv("SENDGRID_API_KEY"));
            Request request = new Request();
            request.setMethod(Method.POST);
            request.setEndpoint("/verified_senders");
            request.setBody(new JSONObject(new HashMap<String, Object>() {
                {
                    put("nickname", "Orders");
                    put("from_email", "orders@example.com");
                    put("from_name", "Example Orders");
                    put("reply_to", "orders@example.com");
                    put("reply_to_name", "Example Orders");
                    put("address", "1234 Fake St");
                    put("address2", "PO Box 1234");
                    put("state", "CA");
                    put("city", "San Francisco");
                    put("country", "USA");
                    put("zip", "94105");
                }
            }).toString());
            Response response = sg.api(request);
            System.out.println(response.getStatusCode());
            System.out.println(response.getBody());
            System.out.println(response.getHeaders());
        } catch (IOException ex) {
            throw ex;
        }
    }
}
```

```go
package main

import (
	"fmt"
	"github.com/sendgrid/sendgrid-go"
	"os"
)

func main() {
	apiKey := os.Getenv("SENDGRID_API_KEY")
	host := "https://api.sendgrid.com"
	request := sendgrid.GetRequest(apiKey, "/v3/verified_senders", host)
	request.Method = "POST"
	request.Body = []byte(`{
  "nickname": "Orders",
  "from_email": "orders@example.com",
  "from_name": "Example Orders",
  "reply_to": "orders@example.com",
  "reply_to_name": "Example Orders",
  "address": "1234 Fake St",
  "address2": "PO Box 1234",
  "state": "CA",
  "city": "San Francisco",
  "country": "USA",
  "zip": "94105"
}`)
	response, err := sendgrid.API(request)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(response.StatusCode)
		fmt.Println(response.Body)
		fmt.Println(response.Headers)
	}
}
```

```php
<?php
// Uncomment the next line if you're using a dependency loader (such as Composer) (recommended)
// require 'vendor/autoload.php';

// Uncomment next line if you're not using a dependency loader (such as Composer)
// require_once '<PATH TO>/sendgrid-php.php';

$apiKey = getenv("SENDGRID_API_KEY");
$sg = new \SendGrid($apiKey);
$request_body = json_decode('{
    "nickname": "Orders",
    "from_email": "orders@example.com",
    "from_name": "Example Orders",
    "reply_to": "orders@example.com",
    "reply_to_name": "Example Orders",
    "address": "1234 Fake St",
    "address2": "PO Box 1234",
    "state": "CA",
    "city": "San Francisco",
    "country": "USA",
    "zip": "94105"
}');

try {
    $response = $sg->client->verified_senders()->post($request_body);
    print $response->statusCode() . "\n";
    print_r($response->headers());
    print $response->body() . "\n";
} catch (Exception $ex) {
    echo "Caught exception: " . $ex->getMessage();
}
```

```ruby
require 'sendgrid-ruby'
include SendGrid

sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
data = JSON.parse('{
  "nickname": "Orders",
  "from_email": "orders@example.com",
  "from_name": "Example Orders",
  "reply_to": "orders@example.com",
  "reply_to_name": "Example Orders",
  "address": "1234 Fake St",
  "address2": "PO Box 1234",
  "state": "CA",
  "city": "San Francisco",
  "country": "USA",
  "zip": "94105"
}')

response = sg.client.verified_senders.post(request_body: data)
puts response.status_code
puts response.headers
puts response.body
```

```bash
curl -X POST "https://api.sendgrid.com/v3/verified_senders" \
--header "Authorization: Bearer $SENDGRID_API_KEY" \
--header "Content-Type: application/json" \
--data '{"nickname": "Orders", "from_email": "orders@example.com", "from_name": "Example Orders", "reply_to": "orders@example.com", "reply_to_name": "Example Orders", "address": "1234 Fake St", "address2": "PO Box 1234", "state": "CA", "city": "San Francisco", "country": "USA", "zip": "94105"}'
```
