# Create a Contact

> Solarium docs, Contacts. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Creates a new vendor or customer.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `contactType` | `String!` | Yes | vendor or customer |
| `displayName` | `String!` | Yes | Contact name |
| `email` | `String` | No | Email address |
| `phone` | `String` | No | Phone number |

### Request

```graphql
mutation {
  createContact(
    organizationId: "a1b2c3d4-..."
    contactType: "vendor"
    displayName: "Staples"
    email: "billing@staples.com"
  ) {
    contact { id displayName contactType }
    success
    error
  }
}
```

### Response

```json
{
  "data": {
    "createContact": {
      "contact": {
        "id": "c3d4e5f6-...",
        "displayName": "Staples",
        "contactType": "vendor"
      },
      "success": true,
      "error": null
    }
  }
}
```
