# Documentation Disaster

**URL:** <https://forum.mautic.org/t/documentation-disaster/18201>\
**Category:** Product Support\
**Created:** [February 17, 2021, 8:40am UTC](https://forum.mautic.org/t/documentation-disaster/18201 "2021-02-17T08:40:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 17, 2021, 10:03am UTC](https://forum.mautic.org/t/documentation-disaster/18201/4 "2021-02-17T10:03:26Z")

</div>

Hey! I’m glad my answer helped.  
If you go with basic auth, you can start from here:

```
<?php
$loginname = 'apiuser';
// Loginname of your API user
$password = 'yourpasswordhere';
// This is the password of the API user
$siteurl = 'yoursiteurl.tld';
// example: mymautic.com
// The data you would like to transfer is called payload. We will set it for now, and later replace with the data we get from the webhook.

$email = 'captain_enterprise-d@starfleet.com';
$firstname = 'Jean-Luc';
$lastname = 'Picard';
$tag = 'purchased';
// This is our curl call:

$curl = curl_init();
// Set some options - we are passing in a user agent too here
  curl_setopt_array($curl, array(
  CURLOPT_RETURNTRANSFER => 1,
  CURLOPT_URL => "https://".$loginname.":".$password."@".$siteurl."/api/contacts/new",
  CURLOPT_USERAGENT => 'Wesleys Secret App',
  CURLOPT_POST => 1,
// posting the payload
  CURLOPT_POSTFIELDS => array(
    'firstname' => $firstname,
    'lastname' => $lastname,
    'email' => $email,
    'tags' => $tag
  )
));
curl_exec($curl);

```

GL:  
Joey

---

_[View the full topic](https://forum.mautic.org/t/documentation-disaster/18201)._
