***

title: purchase
slug: /reference/typescript/rest/compat/phone-numbers/purchase
description: Purchase a new phone number.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Purchase a new phone number for the account.

<EndpointSchemaSnippet endpoint="POST /Accounts/{AccountSid}/IncomingPhoneNumbers" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /Accounts/{AccountSid}/IncomingPhoneNumbers" />

## **Example**

```typescript {8}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});
const number = await client.compat.phoneNumbers.purchase({
  PhoneNumber: "+15551234567",
  FriendlyName: "Main Line"
});
```