# Instance API {#instance-api}


`axios.create(config)` returns an instance with the same request helpers as the
default export, plus a merged `defaults` object and its own interceptor
registry.

```typescript
const api = axios.create({ baseURL: "https://api.example.com", timeout: 5000 });
```


## Instance methods {#instance-methods}


| Method | Kind |
|---|---|
| `getUri(config)` | method |
| `request(config: AxiosRequestConfig<D, P>)` | method |
| `get(url: string, config?: AxiosRequestConfig<D, P>)` | method |
| `delete(url: string, config?: AxiosRequestConfig<D, P>)` | method |
| `head(url: string, config?: AxiosRequestConfig<D, P>)` | method |
| `options(url: string, config?: AxiosRequestConfig<D, P>)` | method |
| `post(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `put(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `patch(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `postForm(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `putForm(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `patchForm(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |
| `query(url: string, data?: D, config?: AxiosRequestConfig<D, P>)` | method |


## HTTP verbs generated by the core {#http-verbs-generated-by-the-core}


`lib/core/Axios.js` builds the verb helpers from the shared method list:

`get`, `delete`, `head`, `options`, `post`, `put`, `patch`, `purge`, `link`, `unlink`, `query`


## Static surface of the default export {#static-surface-of-the-default-export}


`AxiosStatic` (from `index.d.ts`) declares everything reachable on the default
`axios` object:

| Member | Kind |
|---|---|
| `Cancel` | property |
| `CancelToken` | property |
| `Axios` | property |
| `AxiosError` | property |
| `HttpStatusCode` | property |
| `VERSION` | property |
| `isCancel` | property |
| `all` | property |
| `spread` | property |
| `isAxiosError` | property |
| `toFormData` | property |
| `formToJSON` | property |
| `getAdapter` | property |
| `CanceledError` | property |
| `AxiosHeaders` | property |
| `mergeConfig` | property |


## Instance properties {#instance-properties}


| Property | Type | Description |
|---|---|---|
| `defaults` | `AxiosDefaults` | The merged defaults for this instance; mutating it changes later requests. |
| `interceptors` | `InterceptorManager` | Request/response interceptor registries (see [interceptors](https://asporeteam.github.io/sourcey-docs-axios/docs/guides/interceptors/index.md)). |


## Merge rules {#merge-rules}


Instance defaults and per-request config are merged with `mergeConfig`. Keys
defined per request win; `headers`, `params` and `auth` are merged rather than
replaced. See [request config](https://asporeteam.github.io/sourcey-docs-axios/docs/reference/config/index.md) for every key.


## Source {#source}


Parsed from `lib/core/Axios.js` and the `Axios` / `AxiosStatic` interfaces in
`index.d.ts` at commit `e6b79d9cef79`.
