---
title: Create a Contact defined by contact.
slug: create-a-contact-defined-by-contact
docTags: 
createdAt: 2025-08-10T07:26:32.595Z
---

{
  "id": "q0y2I6AGl4Lmoy4GnG1cK",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.usetrust.app/v1/contacts",
    "servers": [],
    "name": "Create a Contact defined by contact.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "ContactInput",
          "schema": [
            {
              "name": "workspaceId",
              "kind": "optional",
              "type": "string",
              "description": "The workspace id for a specific workspace (use GET of Workspaces API endpoint first)",
              "example": "9d885046-f7bf-401e-8f02-83e261553f5b"
            },
            {
              "name": "firstname",
              "kind": "optional",
              "type": "string",
              "description": "First name of contact",
              "example": "Adrian"
            },
            {
              "name": "lastname",
              "kind": "optional",
              "type": "string",
              "description": "Last name of contact",
              "example": "Dray"
            },
            {
              "name": "email",
              "kind": "optional",
              "type": "string",
              "description": "Email address of contact",
              "example": "adrian@email.com"
            },
            {
              "name": "imageUrl",
              "kind": "optional",
              "type": "string",
              "description": "URL to image",
              "example": "https://dealmaker.blob.core.windows.net/images/t_0a9ab71cd20f4bf1b11130e71479743d/silhouette_male.png"
            },
            {
              "name": "phone",
              "kind": "optional",
              "type": "string",
              "description": "Phone number of contact",
              "example": "+49 171 6819254"
            }
          ],
          "modelRef": "#/components/schemas/ContactInput",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basic",
          "name": "basic",
          "kind": "optional",
          "type": "http",
          "description": "Basic Authentication header",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Returns created contact.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Contact",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "example": ""
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "example": ""
              },
              {
                "name": "firstName",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "lastName",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "phone",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "email",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "imageUrl",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Contact",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "YjnnqyuFWu_uk1k8iDEOq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.usetrust.app/v1/contacts \\\n     --header 'accept: application/json'"
        },
        {
          "id": "YbhiP3EaaMZ96OnYDgFMh",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.usetrust.app/v1/contacts\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8iRFqiU0C8CUgROb52Dcc",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.usetrust.app/v1/contacts\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "EKJJtxVrNWJ8rvuunrpYU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.usetrust.app/v1/contacts\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "6Yi5f6qEEhqddOKpA6zS7",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://api.usetrust.app\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/v1/contacts\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        }
      ],
      "selectedLanguageId": "YjnnqyuFWu_uk1k8iDEOq"
    },
    "results": {
      "languages": [
        {
          "id": "zkbePHX-bp1h3X05lV4Z1",
          "language": "201",
          "code": "// Returns created contact.\n{\n  \"id\": \"\",\n  \"created\": \"\",\n  \"firstName\": \"\",\n  \"lastName\": \"\",\n  \"phone\": \"\",\n  \"email\": \"\",\n  \"imageUrl\": \"\"\n}"
        },
        {
          "id": "zvf6g54StL1ANsA5hyjtJ",
          "language": "400",
          "code": "// Bad Request\n\"\""
        },
        {
          "id": "NW_i7nHVEqhnMWMXtW93t",
          "language": "500",
          "code": "// Internal Server Error\n\"\""
        }
      ],
      "selectedLanguageId": "zkbePHX-bp1h3X05lV4Z1"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}