Answers.Body: <p>I was apparently missing <code>classloader</code> in <code>info.xml</code>. Updated it and is now working.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-07T06:12:55.800Z
Answers.LastActivityDate: 2024-08-07T06:12:55.800Z
Answers.UserDisplayName: darkmode
Body: <p>I am trying to add a custom API4 action to an existing Civi API4 action.</p>
  <p>Example:
  Email entity. Add new action to do some stuff.</p>
  <p>In Api3 it is possible. In API4, I am not sure how to do it if possible. Was trying to make a <code>Civi/Api4/Action/Email</code> extending <code>\Civi\Api4\Generic\AbstractAction</code> but I am getting <code>Class does not exist</code> in Api4 Explorer.</p>
  <p>CiviCRM Chat: <a href="https://chat.civicrm.org/civicrm/pl/z8rtpidmjtn6icouyqi1qq8u7e" rel="nofollow noreferrer">https://chat.civicrm.org/civicrm/pl/z8rtpidmjtn6icouyqi1qq8u7e</a></p>
  
Tags: <apiv4><actions><api4>
Title: API 4 Explorer: Adding my custom action to existing Api4 Action from Civi
ThreadText: # API 4 Explorer: Adding my custom action to existing Api4 Action from Civi
  
  (Asked by: username_0 on 2024-08-07)
  
  I am trying to add a custom API4 action to an existing Civi API4 action.
  
  Example:
  Email entity. Add new action to do some stuff.
  
  In Api3 it is possible. In API4, I am not sure how to do it if possible. Was trying to make a `Civi/Api4/Action/Email` extending `\Civi\Api4\Generic\AbstractAction` but I am getting `Class does not exist` in Api4 Explorer.
  
  CiviCRM Chat: <https://chat.civicrm.org/civicrm/pl/z8rtpidmjtn6icouyqi1qq8u7e>
  
  **Tags:** apiv4, actions, api4
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-08-07. Score: 3 | Accepted answer
  
  I was apparently missing `classloader` in `info.xml`. Updated it and is now working.
  
  
  ---
  
  