> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goshippo.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.goshippo.com/feedback

```json
{
  "path": "/docs/Guides_general/API_quickstart",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# API Quickstart Guide

> Make your first Shippo API call by creating an address, setting up your token, and testing a request.

Follow this guide to make your first Shippo API call. In this guide, you will learn how to create an address using the Shippo API.

<Tip>
  Building shipping for multiple merchants?

  A single API account works great for one business. If you're building a platform where other businesses will ship through your integration, there's a different setup that handles per-merchant billing, carrier accounts, and reporting cleanly.

  [See which integration path is right for you →](/docs/Guides_general/integration-paths)
</Tip>

## Generate your API Token

Follow the [Authentication guide](/docs/Guides_general/authentication) to generate your API Token.

<Info>
  **Note**

  When learning about and testing the Shippo API, we recommend using the [test token](/docs/Guides_general/testing).
  Using your test token means all the calls you make to the Shippo API are free.
</Info>

## Install the client library for your language

<CodeGroup>
  ```shell title="cURL" theme={null}
  # No library needed for cURL
  ```

  ```python title="Python" theme={null}
  pip install shippo
  ```

  ```php title="PHP" theme={null}
  // Follow the steps in 
  // https://github.com/goshippo/shippo-php-client
  ```

  ```javascript title="Node.js" theme={null}
  npm install shippo
  ```

  ```java title="Java" theme={null}
  // Java
  npm install shippo
  ```

  ```cs title="C#" theme={null}
  dotnet add package Shippo
  ```

  ```other title="Other libraries" theme={null}
  // For a full list of supported libraries, review our client libraries page
  // https://docs.goshippo.com/docs/guides_general/clientlibraries/
  ```
</CodeGroup>

See our [client libraries](/docs/Guides_general/ClientLibraries) page for more details.

## Make your first API call

To make sure everything is working, make a simple call to create a new address in your Shippo account.

You must replace `<API_TOKEN>` with the token you copied from [Step 1](#generate-your-api-token).

<CodeGroup>
  ```shell title="cURL" theme={null}
  curl https://api.goshippo.com/addresses/ \
     -H "Authorization: ShippoToken <API_TOKEN>" \
     -d name="Shawn Ippotle" \
     -d company="Shippo" \
     -d street1="215 Clayton St." \
     -d street2="" \
     -d city="San Francisco" \
     -d state="CA" \
     -d zip=94117 \
     -d country="US" \
     -d phone="+1 555 341 9393" \
     -d email="shippotle@shippo.com"\
     -d is_residential=True\
     -d metadata="Customer ID 123456"
  ```

  ```python title="Python" theme={null}
  import shippo
  from shippo.models import components

  shippo_sdk = shippo.Shippo(api_key_header="<API_Token>")

  shippo_sdk.addresses.create(
      components.AddressCreateRequest(
          name="Shawn Ippotle",
          company="Shippo",
          street1="215 Clayton St.",
          city="San Francisco",
          state="CA",
          zip="94117",
          country="US", # iso2 country code
          phone="+1 555 341 9393",
          email="shippotle@shippo.com"
      )
  )
  ```

  ```php title="PHP" theme={null}
  require_once('lib/Shippo.php');
  Shippo::setApiKey("<API_TOKEN>");

  // Create address object
  $fromAddress = Shippo_Address::create( array(
      "name" => "Shawn Ippotle",
      "company" => "Shippo",
      "street1" => "215 Clayton St.",
      "city" => "San Francisco",
      "state" => "CA",
      "zip" => "94117",
      "country" => "US",
      "phone" => "+1 555 341 9393",
      "email" => "shippotle@shippo.com" 
  ));
  ```

  ```typescript title="TypeScript" theme={null}
  // Create address object
  const shippo = new Shippo({apiKeyHeader: '<API_TOKEN>'});
  const addressFrom = await shippo.addresses.create({
      name: "Shawn Ippotle",
      company: "Shippo",
      street1: "215 Clayton St.",
      city: "San Francisco",
      state: "CA",
      zip: "94117",
      country: "US", // iso2 country code
      phone: "+1 555 341 9393",
      email: "shippotle@shippo.com",
  });
  ```

  ```java title="Java" theme={null}
  Shippo.setApiKey('<API_TOKEN>');

  HashMap<String, Object> addressMap = new HashMap<String, Object>();
  addressMap.put("name", "Mr. Hippo");
  addressMap.put("company", "Shippo");
  addressMap.put("street1", "215 Clayton St.");
  addressMap.put("city", "San Francisco");
  addressMap.put("state", "CA");
  addressMap.put("zip", "94117");
  addressMap.put("country", "US");
  addressMap.put("phone", "+1 555 341 9393");
  addressMap.put("email", "support@goshipppo.com");

  Address createAddress = Address.create(addressMap);
  ```

  ```cs title="C#" theme={null}
  using Shippo;
  using Shippo.Models.Components;
  ShippoSDK sdk = new ShippoSDK(apiKeyHeader: "<API_TOKEN>");
  Address address = await sdk.Addresses.CreateAsync(
      new AddressCreateRequest()
      {
          Name = "Shawn Ippotle",
          Company = "Shippo",
          Street1 = "215 Clayton St.",
          City = "San Francisco",
          State = "CA",
          Zip = "94117",
          Country = "US",
          Phone = "+1 555 341 9393",
          Email = "shippotle@shippo.com",
      }
  );
  ```

  ```other title="Other libraries" theme={null}
  // For a full list of supported libraries, review our client libraries page
  // https://docs.goshippo.com/docs/guides_general/clientlibraries/
  ```
</CodeGroup>

If your request to create a new address was a success, the response should look like the following. If you don't get a response like this, check your code and make sure your API token is correct.

```json theme={null}
{
   "is_complete": true,
   "object_created":"2022-07-09T02:19:13.174Z",
   "object_updated":"2022-07-09T02:19:13.174Z",
   "object_id":"d799c2679e644279b59fe661ac8fa488",
   "object_owner":"shippotle@shippo.com",
   "validation_results": {},
   "name":"Shawn Ippotle",
   "company":"Shippo",
   "street_no": "",
   "street1":"215 Clayton St.",
   "street2":"",
   "street3":"",
   "city":"San Francisco",
   "state":"CA",
   "zip":"94117",
   "country":"US",
   "longitude": null,
   "latitude": null,
   "phone":"15553419393",
   "email":"shippotle@shippo.com",
   "is_residential":true,
   "metadata":"Customer ID 123456"
}
```

## Next steps

You now know how to make API calls using the Shippo API. Your next step is to create your [first shipping label](/docs/Guides_general/generate_shipping_label).

You can also start exploring our [API reference](/api-reference/addresses/list-all-addresses) to learn about all the Shippo API features.
