# Creating Campaign through rest API throws At least one event is required

**URL:** <https://forum.mautic.org/t/creating-campaign-through-rest-api-throws-at-least-one-event-is-required/8396>\
**Category:** Product Support\
**Created:** [May 2, 2017, 9:00am UTC](https://forum.mautic.org/t/creating-campaign-through-rest-api-throws-at-least-one-event-is-required/8396 "2017-05-02T09:00:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsrosas](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jsrosas](https://forum.mautic.org/u/jsrosas)\
**Post date:** [May 2, 2017, 9:00am UTC](https://forum.mautic.org/t/creating-campaign-through-rest-api-throws-at-least-one-event-is-required/8396/1 "2017-05-02T09:00:28Z")

</div>

Hi all,  
  
Thanks in advance for any help you can give me. I am trying to create a new campaign using the API from a custom CRM.  
  
I am sending my request through GuzzleHttp with an array as follows(per Mautic documentation):

Code:

$array = ['name' =\> $campaign-\>name, 'description' =\> $campaign-\>description, 'isPublished' =\> 1];

But I get an error 400 bad request: At least one event is required. Use the Launch Campaign Builder.  
I cannot use the API library for Mautic as it does not authenticate. Is there a restful way to create a Campaign for Mautic?

---

<div class="post-metadata">

**Author:** ![jsrosas](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jsrosas](https://forum.mautic.org/u/jsrosas)\
**Post date:** [May 2, 2017, 9:00am UTC](https://forum.mautic.org/t/creating-campaign-through-rest-api-throws-at-least-one-event-is-required/8396/2 "2017-05-02T09:00:28Z")

</div>

Hi all,  
Thanks in advance for any help you can give me. I am trying to create a new campaign using the API from a custom CRM.  
I am sending my request through GuzzleHttp with an array as follows(per Mautic documentation):

`$array = [
            'name' => $campaign->name,
            'description' => $campaign->description,
            'isPublished' => 1
        ];
`  
But I get an error 400 bad request: At least one event is required. Use the Launch Campaign Builder.  
I cannot use the API library for Mautic as it does not authenticate. Is there a restful way to create a Campaign for Mautic?
