# Update 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

Changes a contact's name, legal name, contact person, billing address, emails, phone or province. Only what you pass changes. An empty string clears a field.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `name` | `String!` | Yes | "update_contact" |
| `params.contact_id` | `String!` | Yes | The contact |
| `params.name` | `String` | No | A new name. Refused if another contact of the same type has it (merge them instead) |
| `params.legal_name` | `String` | No | Printed on their invoices |
| `params.contact_name` | `String` | No | Printed as Attn: |
| `params.billing_address` | `String` | No | One line per line |
| `params.email` | `String` | No | One or more emails, comma-separated. A customer's invoices go to all of them |
| `params.phone` | `String` | No | Phone number |
| `params.region` | `String` | No | The province of their address |
| `apply` | `Boolean` | No | true to save it |

### Request

```graphql
mutation {
  runOp(
    organizationId: "a1b2c3d4-..."
    name: "update_contact"
    apply: true
    params: { contact_id: "b2c3d4e5-...", legal_name: "North Group Holdings Ltd.", contact_name: "Dana Park" }
  ) { success applied result }
}
```

### Response

```json
{
  "data": {
    "runOp": {
      "success": true,
      "applied": true,
      "result": { "summary": "North Group Updated: contact_name, legal_name." }
    }
  }
}
```
