# createEventSponsor

Source: https://swapcard.dev/organizer/content-api/graphql-event-api-schema/mutations/create-event-sponsor


const [open, setOpen] = useState(startOpen);
  return (
    <details {...(open ? { open: true } : {})} className="details" style={{ border:'none', boxShadow:'none', background:'var(--ifm-background-color)' }}>
      <summary
        onClick={(e) => {
          e.preventDefault();
          setOpen((open) => !open);
        }}
        style={{ listStyle:'none' }}
      >
      {open ? dataOpen : dataClose}
      </summary>
      {open && children}
    </details>
  );
};

Create swapcard event sponsor

```graphql
createEventSponsor(
  eventId: String!
  sponsor: CreateSponsorInput!
): SponsorUnion!
```

### Arguments

#### [<code style={{ fontWeight: 'normal' }}>createEventSponsor.<b>eventId</b></code>](#)<Bullet />[`String!`](/organizer/content-api/graphql-event-api-schema/scalars/string) <Badge class="badge badge--secondary" text="non-null"/> <Badge class="badge badge--secondary" text="scalar"/> 
> 
> 
> A Swapcard event id
> 

#### [<code style={{ fontWeight: 'normal' }}>createEventSponsor.<b>sponsor</b></code>](#)<Bullet />[`CreateSponsorInput!`](/organizer/content-api/graphql-event-api-schema/inputs/create-sponsor-input) <Badge class="badge badge--secondary" text="non-null"/> <Badge class="badge badge--secondary" text="input"/> 
> 
> 
> 
> 

### Type

#### [`SponsorUnion`](/organizer/content-api/graphql-event-api-schema/unions/sponsor-union) <Badge class="badge badge--secondary" text="union"/> 
> 
> 
> 
>
